summaryrefslogtreecommitdiff
path: root/ares_gethostbyaddr.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-09-15 17:14:29 +0000
committerYang Tse <yangsita@gmail.com>2008-09-15 17:14:29 +0000
commitf2582d69495d9b418d096d14f9db205b004a49c3 (patch)
tree31abd504060626baa78a77bc72c01d5bb778bca0 /ares_gethostbyaddr.c
parent746f3e2942c36511fda867cac0573d2907290db0 (diff)
downloadc-ares-f2582d69495d9b418d096d14f9db205b004a49c3.tar.gz
c-ares-f2582d69495d9b418d096d14f9db205b004a49c3.tar.bz2
c-ares-f2582d69495d9b418d096d14f9db205b004a49c3.zip
include header file only when available
Diffstat (limited to 'ares_gethostbyaddr.c')
-rw-r--r--ares_gethostbyaddr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ares_gethostbyaddr.c b/ares_gethostbyaddr.c
index 7b4a733..1274d5a 100644
--- a/ares_gethostbyaddr.c
+++ b/ares_gethostbyaddr.c
@@ -19,10 +19,21 @@
#if defined(WIN32) && !defined(WATT32)
#include "nameser.h"
#else
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
+#endif
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
#include <arpa/nameser_compat.h>
#endif