Explorar o código

Added specific headers detection and include

This is a workaround for headers mess on Solaris
Evgeny Grin (Karlson2k) %!s(int64=2) %!d(string=hai) anos
pai
achega
f612eccd67
Modificáronse 2 ficheiros con 11 adicións e 2 borrados
  1. 8 2
      configure.ac
  2. 3 0
      src/microhttpd/test_client_put_stop.c

+ 8 - 2
configure.ac

@@ -97,8 +97,8 @@ AC_CHECK_HEADERS([endian.h machine/endian.h sys/endian.h sys/byteorder.h \
                   sys/ioctl.h], [], [], [AC_INCLUDES_DEFAULT])
 
 # Check for network and sockets optional headers
-AC_CHECK_HEADERS([sys/socket.h sys/select.h netinet/in.h arpa/inet.h \
-                  netinet/ip.h netinet/tcp.h net/if.h \
+AC_CHECK_HEADERS([sys/socket.h sys/select.h netinet/in_systm.h netinet/in.h \
+                  arpa/inet.h netinet/ip.h netinet/tcp.h net/if.h \
                   netdb.h sockLib.h inetLib.h], [], [],
   [AC_INCLUDES_DEFAULT
    [
@@ -111,6 +111,9 @@ AC_CHECK_HEADERS([sys/socket.h sys/select.h netinet/in.h arpa/inet.h \
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif /* HAVE_SYS_SOCKET_H */
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif /* HAVE_NETINET_IN_SYSTM_H */
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif /* HAVE_NETINET_IN_H */
@@ -259,6 +262,9 @@ AC_CHECK_HEADERS([sys/sysctl.h netinet/ip_icmp.h netinet/icmp_var.h], [], [],
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif /* HAVE_SYS_SOCKET_H */
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif /* HAVE_NETINET_IN_SYSTM_H */
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif /* HAVE_NETINET_IN_H */

+ 3 - 0
src/microhttpd/test_client_put_stop.c

@@ -64,6 +64,9 @@
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif /* HAVE_SYS_SOCKET_H */
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif /* HAVE_NETINET_IN_SYSTM_H */
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif /* HAVE_NETINET_IN_H */