Add configure test for arpa/inet.h
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 29 May 2013 04:25:08 +0000 (21:25 -0700)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 29 May 2013 04:25:08 +0000 (21:25 -0700)
configure.ac
lib/socket.c

index d129e9ea43b59e9dee211aa8762ccdfd991300d9..e5b170eb424f6432c0db534d4542f8b85e8e8f9b 100644 (file)
@@ -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],
index 733f1f4768e8a0b41c9a51a0903d73e1d08539c0..8dc3ed2d6b0d5a9fc1a5d731f2cd96bd3ad0d48c 100644 (file)
 
 #ifdef WIN32
 #include "win32_compat.h"
-#else
+#endif
+
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
-#endif/*WIN32*/
+#endif
 
 #ifdef HAVE_POLL_H
 #include <poll.h>