gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compilation problems on Solaris 10


From: Rob McMahon
Subject: Compilation problems on Solaris 10
Date: Thu, 19 Jul 2012 17:08:58 +0100
User-agent: Mozilla/5.0 (X11; SunOS i86pc; rv:12.0) Gecko/20120423 Thunderbird/12.0

Solaris 10,
cc: Sun WorkShop 6 update 2 C 5.3 Patch 111679-12 2003/05/18
gnutls-3.0.21

The file lib/nettle/cipher.c fails to compile saying

  CC     cipher.lo
"cipher.c", line 93: void function cannot return value
"cipher.c", line 101: void function cannot return value
cc: acomp failed for cipher.c

_gcm_encrypt and_gcm_decrypt are declared void. gcm_aes_encrypt andgcm_aes_decrypt are also void functions in libnettle.

> rcsdiff -u5 cipher.c
===================================================================
RCS file: cipher.c,v
retrieving revision 1.1
diff -u5 -r1.1 cipher.c
--- cipher.c    2012/07/19 14:45:28     1.1
+++ cipher.c    2012/07/19 14:45:52
@@ -88,19 +88,19 @@
 static void _gcm_encrypt(void *_ctx, nettle_crypt_func f,
             unsigned block_size, uint8_t *iv,
             unsigned length, uint8_t *dst,
             const uint8_t *src)
 {
-  return gcm_aes_encrypt(_ctx, length, dst, src);
+  gcm_aes_encrypt(_ctx, length, dst, src);
 }

 static void _gcm_decrypt(void *_ctx, nettle_crypt_func f,
             unsigned block_size, uint8_t *iv,
             unsigned length, uint8_t *dst,
             const uint8_t *src)
 {
-  return gcm_aes_decrypt(_ctx, length, dst, src);
+  gcm_aes_decrypt(_ctx, length, dst, src);
 }

 static int wrap_nettle_cipher_exists(gnutls_cipher_algorithm_t algo)
 {
   switch (algo)
Exit 1


The two test files openpgp-auth.c fail to compile with "alloca undefined". They need to #include <alloca.h>:

> rcsdiff -u openpgp-auth*.c,v
===================================================================
RCS file: openpgp-auth.c,v
retrieving revision 1.1
diff -u -r1.1 openpgp-auth.c
--- openpgp-auth.c      2012/07/19 15:16:54     1.1
+++ openpgp-auth.c      2012/07/19 15:17:44
@@ -39,6 +39,9 @@
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
 #if !defined(_WIN32)
 static const char message[] = "Hello, brave GNU world!";

===================================================================
RCS file: openpgp-auth2.c,v
retrieving revision 1.1
diff -u -r1.1 openpgp-auth2.c
--- openpgp-auth2.c     2012/07/19 15:19:27     1.1
+++ openpgp-auth2.c     2012/07/19 15:19:54
@@ -39,7 +39,9 @@
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>
-
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif

 /* This is the same test as openpgp-auth but tests
  * openpgp under the latest TLS protocol (TLSv1.2). In
Exit 1

Cheers,

Rob

--
E-Mail: address@hidden          PHONE:  +44 24 7652 3037
Rob McMahon, IT Services, Warwick University, Coventry, CV4 7AL, England




reply via email to

[Prev in Thread] Current Thread [Next in Thread]