aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-09-30 02:12:11 +0000
committerYang Tse <yangsita@gmail.com>2007-09-30 02:12:11 +0000
commit62c264bcdbcc3009d902300bbccbe11e569dc775 (patch)
tree2166c0fb2213ddef2f4a4234053a58ab55f18c89
parentb108c664ac5535595609ef771eb38c14ae6bb582 (diff)
check availability of <netinet/tcp.h>
-rw-r--r--ares/ares_process.c14
-rw-r--r--ares/configure.ac1
2 files changed, 13 insertions, 2 deletions
diff --git a/ares/ares_process.c b/ares/ares_process.c
index 0a133a27f..4ff918e22 100644
--- a/ares/ares_process.c
+++ b/ares/ares_process.c
@@ -21,14 +21,24 @@
#include "nameser.h"
#else
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
-#include <netinet/tcp.h> /* for TCP_NODELAY */
-#include <netinet/in.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h> /* <netinet/tcp.h> may need it */
+#endif
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h> /* for TCP_NODELAY */
+#endif
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
+#endif
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
#include <arpa/nameser_compat.h>
#endif
diff --git a/ares/configure.ac b/ares/configure.ac
index 874901d9e..22fb4b35d 100644
--- a/ares/configure.ac
+++ b/ares/configure.ac
@@ -340,6 +340,7 @@ AC_CHECK_HEADERS(
sys/param.h \
netdb.h \
netinet/in.h \
+ netinet/tcp.h \
net/if.h \
errno.h \
stdbool.h \