Add configure checks for sys/socket.h
[deb_libnfs.git] / lib / libnfs-sync.c
index 4478a498bfc1804bbdaba7b0406d6069b5c1d57b..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
 #include <unistd.h>
 #endif
 
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -65,7 +72,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <netinet/in.h>
 #include <errno.h>
 
 #ifdef HAVE_SYS_SOCKIO_H