summaryrefslogtreecommitdiff
path: root/ares_process.c
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
commit68aa62d76bf2fd6b19ad351ff42a22a0ef588604 (patch)
tree3f723f7355a7c824278dc7a01311e5971eb94f31 /ares_process.c
parenta0b8ac2bdc5e2706811b5516f36d882daa2624ed (diff)
downloadc-ares-68aa62d76bf2fd6b19ad351ff42a22a0ef588604.tar.gz
c-ares-68aa62d76bf2fd6b19ad351ff42a22a0ef588604.tar.bz2
c-ares-68aa62d76bf2fd6b19ad351ff42a22a0ef588604.zip
check availability of <netinet/tcp.h>
Diffstat (limited to 'ares_process.c')
-rw-r--r--ares_process.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/ares_process.c b/ares_process.c
index 0a133a2..4ff918e 100644
--- a/ares_process.c
+++ b/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