Add configure checks for sys/socket.h
[deb_libnfs.git] / examples / nfsclient-bcast.c
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"