From: Ronnie Sahlberg Date: Wed, 29 May 2013 04:25:08 +0000 (-0700) Subject: Add configure test for arpa/inet.h X-Git-Tag: upstream/1.9.6^2~197 X-Git-Url: https://git.piment-noir.org/?p=deb_libnfs.git;a=commitdiff_plain;h=c022471e52d3ea679139cdf026dcde179c8de23c Add configure test for arpa/inet.h --- diff --git a/configure.ac b/configure.ac index d129e9e..e5b170e 100644 --- a/configure.ac +++ b/configure.ac @@ -125,6 +125,10 @@ AC_CHECK_HEADERS([sys/socket.h]) dnl Check for netinet/in.h AC_CHECK_HEADERS([netinet/in.h]) +# check for arpa/inet.h +dnl Check for arpa/inet.h +AC_CHECK_HEADERS([arpa/inet.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/lib/socket.c b/lib/socket.c index 733f1f4..8dc3ed2 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -24,9 +24,11 @@ #ifdef WIN32 #include "win32_compat.h" -#else +#endif + +#ifdef HAVE_ARPA_INET_H #include -#endif/*WIN32*/ +#endif #ifdef HAVE_POLL_H #include