commit b837d5e008fbd4c57558320988018bd8239a5a34
parent 8269477acc56e3c20bb5a0d5f1a430b524597e12
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Wed, 31 Aug 2016 16:15:01 +0000
mhd_sockets.h: improved compatibility with old platforms
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/microhttpd/mhd_sockets.h b/src/microhttpd/mhd_sockets.h
@@ -52,6 +52,9 @@
* for socket function.
*/
#if defined(MHD_POSIX_SOCKETS)
+# ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* required on old platforms */
+# endif
# ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
# endif
@@ -95,9 +98,6 @@
# ifdef HAVE_STRING_H
# include <string.h> /* for strerror() */
# endif
-# if defined(HAVE_SYS_TYPES_H)
-# include <sys/types.h> /* required on old platforms */
-# endif /* (!HAVE_SYS_SOCKET_H || !HAVE_SYS_SOCKET_H) && HAVE_SYS_TYPES_H */
#elif defined(MHD_WINSOCK_SOCKETS)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN 1