summaryrefslogtreecommitdiff
path: root/ext/socket/getnameinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/getnameinfo.c')
-rw-r--r--ext/socket/getnameinfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index fbb39e059e..abadd8f442 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -39,10 +39,14 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#if defined(HAVE_ARPA_NAMESER_H)
#include <arpa/nameser.h>
+#endif
#include <netdb.h>
+#if defined(HAVE_RESOLV_H)
#include <resolv.h>
#endif
+#endif
#ifdef NT
#include <winsock2.h>
#include <stdio.h>