From c022471e52d3ea679139cdf026dcde179c8de23c Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 28 May 2013 21:25:08 -0700 Subject: [PATCH] Add configure test for arpa/inet.h --- configure.ac | 4 ++++ lib/socket.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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 -- 2.34.1