Include opensslconf.h or the like early to make sure system macros get
[openssl.git] / apps / s_socket.c
index c261abb3612430c6ae5f34d895fe90d633548812..f60d92948431bb96d983ad66b31abcef1fe14e3c 100644 (file)
 #include <errno.h>
 #include <signal.h>
 
+#define USE_SOCKETS
+#define NON_MAIN
+#include "apps.h"
+#undef USE_SOCKETS
+#undef NON_MAIN
+#include "s_apps.h"
+#include <openssl/ssl.h>
+
 /* With IPv6, it looks like Digital has mixed up the proper order of
    recursive header file inclusion, resulting in the compiler complaining
    that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
 typedef unsigned int u_int;
 #endif
 
-#define USE_SOCKETS
-#define NON_MAIN
-#include "apps.h"
-#undef USE_SOCKETS
-#undef NON_MAIN
-#include "s_apps.h"
-#include <openssl/ssl.h>
-
 static struct hostent *GetHostByName(char *name);
 #ifdef OPENSSL_SYS_WINDOWS
 static void sock_cleanup(void);