aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-07-31 08:50:20 +0000
committerRichard Levitte <levitte@openssl.org>2001-07-31 08:50:20 +0000
commit3728974460717c4523d2d81508d8aeb87e7f61b8 (patch)
treebab085a2f45dee565a3b747a12fc5f2901b28586
parentfdc2bbcacbb61ec5d0922b8a8dbddc3fcaca3774 (diff)
downloadopenssl-3728974460717c4523d2d81508d8aeb87e7f61b8.tar.gz
Make as sure as possible that gethostname() will be properly declared.
-rw-r--r--ssl/ssltest.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ssl/ssltest.c b/ssl/ssltest.c
index 0960c1acbc..7d1249fd5c 100644
--- a/ssl/ssltest.c
+++ b/ssl/ssltest.c
@@ -109,6 +109,12 @@
*
*/
+#define _XOPEN_SOURCE 600 /* Or gethostname won't be declared properly
+ on Linux and GNU platforms. */
+#define _XOPEN_SOURCE_EXTENDED /* Or gethostname won't be declared properly
+ on Compaq platforms (at least with DEC C).
+ */
+
#include <assert.h>
#include <errno.h>
#include <limits.h>
@@ -130,6 +136,8 @@
#ifdef OPENSSL_SYS_WINDOWS
#include <winsock.h>
#include "../crypto/bio/bss_file.c"
+#else
+#include OPENSSL_UNISTD
#endif
#ifdef OPENSSL_SYS_VMS