From 728970051cb7420c08c3c4860f09f971880e3244 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 28 May 2013 17:38:37 -0700 Subject: [PATCH] Add configure checks for whether netinet/in.h is available or not --- configure.ac | 4 ++++ examples/nfsclient-raw.c | 5 ++++- lib/libnfs-sync.c | 5 ++++- lib/libnfs.c | 5 ++++- lib/pdu.c | 9 ++++++++- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index ab86b49..d76896a 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 netinet/in.h +dnl Check for netinet/in.h +AC_CHECK_HEADERS([netinet/in.h]) + # check for SA_LEN dnl Check if sockaddr data structure includes a "sa_len" AC_CHECK_MEMBER([struct sockaddr.sa_len], diff --git a/examples/nfsclient-raw.c b/examples/nfsclient-raw.c index 2d5104f..80a38f0 100644 --- a/examples/nfsclient-raw.c +++ b/examples/nfsclient-raw.c @@ -32,10 +32,13 @@ #include #endif +#ifdef HAVE_NETINET_IN_H +#include +#endif + #include #include #include -#include #include "libnfs-zdr.h" #include "libnfs.h" #include "libnfs-raw.h" diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c index 5ca7c66..c145d8f 100644 --- a/lib/libnfs-sync.c +++ b/lib/libnfs-sync.c @@ -32,7 +32,6 @@ #include #include #include -#include #endif /*WIN32*/ #ifdef ANDROID @@ -59,6 +58,10 @@ #include #endif +#ifdef HAVE_NETINET_IN_H +#include +#endif + #include #include #include diff --git a/lib/libnfs.c b/lib/libnfs.c index 97663ac..543b0ce 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -30,7 +30,6 @@ #else #include #include -#include #endif /*WIN32*/ #ifdef ANDROID @@ -51,6 +50,10 @@ #include #endif +#ifdef HAVE_NETINET_IN_H +#include +#endif + #include #include #include diff --git a/lib/pdu.c b/lib/pdu.c index 3d8feca..8311d88 100644 --- a/lib/pdu.c +++ b/lib/pdu.c @@ -14,6 +14,10 @@ You should have received a copy of the GNU Lesser General Public License along with this program; if not, see . */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef AROS #include "aros_compat.h" #endif @@ -23,9 +27,12 @@ #else #include #include -#include #endif/*WIN32*/ +#ifdef HAVE_NETINET_IN_H +#include +#endif + #include #include #include -- 2.34.1