ssltest.c doesn't currently build (from 0.9.7-stable branch) with GCC
2.95.x on Solaris/x86 platforms; failures are like:

gcc -I.. -I../include  -fPIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN 
-DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -O3 -fomit-frame-pointer -m486 -Wall 
-DL_ENDIAN -DOPENSSL_NO_INLINE_ASM -DSHA1_ASM -DMD5_ASM -DRMD160_ASM  -c  
ssltest.c
In file included from ../include/openssl/bio.h:65,
                 from ssltest.c:128:
/usr/local/lib/gcc-lib/i386-pc-solaris2.6/2.95.3/include/stdarg.h:170: 
conflicting types for `va_list'
/usr/include/stdio.h:90: previous declaration of `va_list'
*** Error code 1

The "#define _XOPEN_SOURCE 600" is the culprit, it seems, which is for
Linux systems apparently.  The glibc unistd.h I have defines gethostname
on this conditional:

#if defined __USE_BSD || defined __USE_XOPEN2K

so this seems like a reasonable fix:

--- ssltest.c.orig      Tue Nov 26 10:47:12 2002
+++ ssltest.c   Tue Nov 26 10:46:11 2002
@@ -109,7 +109,7 @@
  *
  */
 
-#define _XOPEN_SOURCE 600      /* Or gethostname won't be declared properly
+#define _BSD_SOURCE 1          /* Or gethostname won't be declared properly
                                   on Linux and GNU platforms. */
 #define _XOPEN_SOURCE_EXTENDED 1 /* Or gethostname won't be declared properly
                                   on Compaq platforms (at least with DEC C).


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to