From 7057e733c1465661c410b65d90e4c5d0939f1617 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 28 May 2013 17:43:47 -0700 Subject: [PATCH] Add configure checks for sys/socket.h --- configure.ac | 4 ++++ examples/nfsclient-bcast.c | 5 ++++- lib/libnfs-sync.c | 5 ++++- lib/pdu.c | 5 ++++- lib/socket.c | 5 ++++- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index d76896a..1b4b66b 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/examples/nfsclient-bcast.c b/examples/nfsclient-bcast.c index 9f7076b..ae08f16 100644 --- a/examples/nfsclient-bcast.c +++ b/examples/nfsclient-bcast.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -46,6 +45,10 @@ #include #endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + #include "libnfs-zdr.h" #include "libnfs.h" #include "libnfs-raw.h" diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c index c145d8f..836e135 100644 --- a/lib/libnfs-sync.c +++ b/lib/libnfs-sync.c @@ -30,7 +30,6 @@ #else #include #include -#include #include #endif /*WIN32*/ @@ -50,6 +49,10 @@ #include #endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + #ifdef HAVE_POLL_H #include #endif diff --git a/lib/pdu.c b/lib/pdu.c index 8311d88..d25c448 100644 --- a/lib/pdu.c +++ b/lib/pdu.c @@ -26,13 +26,16 @@ #include "win32_compat.h" #else #include -#include #endif/*WIN32*/ #ifdef HAVE_NETINET_IN_H #include #endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + #include #include #include diff --git a/lib/socket.c b/lib/socket.c index 699ed8a..6538535 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -26,7 +26,6 @@ #include "win32_compat.h" #else #include -#include #include #endif/*WIN32*/ @@ -42,6 +41,10 @@ #include #endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + #include #include #include -- 2.34.1