Add configure checks for sys/socket.h
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 29 May 2013 00:43:47 +0000 (17:43 -0700)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 29 May 2013 00:43:47 +0000 (17:43 -0700)
configure.ac
examples/nfsclient-bcast.c
lib/libnfs-sync.c
lib/pdu.c
lib/socket.c

index d76896adccbc7b37d7005457ae293653a716a3b4..1b4b66b5375b066c94826b860b4c91320b180610 100644 (file)
@@ -101,6 +101,10 @@ AC_CHECK_HEADERS([sys/vfs.h])
 dnl Check for sys/statvfs.h
 AC_CHECK_HEADERS([sys/statvfs.h])
 
+# check for sys/socket.h
+dnl Check for sys/socket.h
+AC_CHECK_HEADERS([sys/socket.h])
+
 # check for netinet/in.h
 dnl Check for netinet/in.h
 AC_CHECK_HEADERS([netinet/in.h])
index 9f7076b0b3d34517990bbea6ba42305b1bb81b9b..ae08f16e5fe3f02d681adcbed92b114167ddb585 100644 (file)
@@ -37,7 +37,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#include <sys/socket.h>
 #include <sys/time.h>
 #include <net/if.h>
 #include <netdb.h>
 #include <sys/ioctl.h>
 #endif
 
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
 #include "libnfs-zdr.h"
 #include "libnfs.h"
 #include "libnfs-raw.h"
index c145d8fb5ff894c4921f0b0deb6a83fbf3b0ae8b..836e1354eaef5683a75c3cdde991390d1e3a0834 100644 (file)
@@ -30,7 +30,6 @@
 #else
 #include <strings.h>
 #include <netdb.h>
-#include <sys/socket.h>
 #include <net/if.h>
 #endif /*WIN32*/
 
 #include <sys/ioctl.h>
 #endif
 
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
 #ifdef HAVE_POLL_H
 #include <poll.h>
 #endif
index 8311d88169d06edd3c12b89af812689e49984203..d25c448caef0cc855ef6b52594cf6e1f22a43650 100644 (file)
--- a/lib/pdu.c
+++ b/lib/pdu.c
 #include "win32_compat.h"
 #else
 #include <strings.h>
-#include <sys/socket.h>
 #endif/*WIN32*/
 
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 699ed8a8fad0524b653c638ff71f1cf26fe33e13..653853549e45b29627eb5be44c631460679da098 100644 (file)
@@ -26,7 +26,6 @@
 #include "win32_compat.h"
 #else
 #include <arpa/inet.h>
-#include <sys/socket.h>
 #include <netdb.h>
 #endif/*WIN32*/
 
 #include <sys/ioctl.h>
 #endif
 
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>