diff options
author | Richard Levitte <levitte@openssl.org> | 2002-12-19 19:38:51 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-12-19 19:38:51 +0000 |
commit | bbd6c8bd165882ee4116e6e211f6032591dc66d6 (patch) | |
tree | 352bb1879dd4c7c98263782cf1494c56c825de76 /ssl/ssltest.c | |
parent | 00f76ad0dfec5fc0a19b5d2052ebbaef0fd87fb8 (diff) |
If _XOPEN_SOURCE_EXTENDED or _XOPEN_SOURCE are defined, _POSIX_C_SOURCE gets
defined in DECC$TYPES.H. If _POSIX_C_SOURCE is defined, certain types do
not get defined (u_char, u_int, ...). DECC.H gets included by assert.h
and others. Now, in6.h uses the types u_char, u_int and so on, and gets
included as part of other header inclusions, and will of course fail because
of the missing types.
On the other hand, _XOPEN_SOURCE_EXTENDED is needed to get gethostname()
properly declared...
Solution: define _XOPEN_SOURCE_EXTENDED much later, so DECC$TYPES.H has
a chance to be included *first*, so the otherwise missing types get defined
properly.
Personal: *mumble* *mumble*
Diffstat (limited to 'ssl/ssltest.c')
-rw-r--r-- | ssl/ssltest.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ssl/ssltest.c b/ssl/ssltest.c index fccab9a2ce..4fa9d41d59 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c @@ -111,9 +111,6 @@ #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). - */ #include <assert.h> #include <errno.h> @@ -134,6 +131,13 @@ #include <openssl/engine.h> #include <openssl/err.h> #include <openssl/rand.h> + +#define _XOPEN_SOURCE_EXTENDED 1 /* Or gethostname won't be declared properly + on Compaq platforms (at least with DEC C). + Do not try to put it earlier, or IPv6 includes + get screwed... + */ + #ifdef OPENSSL_SYS_WINDOWS #include <winsock.h> #include "../crypto/bio/bss_file.c" |