aboutsummaryrefslogtreecommitdiff
path: root/ares/ares__get_hostent.c
diff options
context:
space:
mode:
Diffstat (limited to 'ares/ares__get_hostent.c')
-rw-r--r--ares/ares__get_hostent.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ares/ares__get_hostent.c b/ares/ares__get_hostent.c
index cea95aed7..40dad5d56 100644
--- a/ares/ares__get_hostent.c
+++ b/ares/ares__get_hostent.c
@@ -18,11 +18,19 @@
#include "setup.h"
#if !defined(WIN32) || defined(WATT32)
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
-#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#endif
#include <stdio.h>
#include <stdlib.h>