aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/inet_pton.c10
-rw-r--r--lib/inet_pton.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/inet_pton.c b/lib/inet_pton.c
index 0945bdcb4..6cd6bcac5 100644
--- a/lib/inet_pton.c
+++ b/lib/inet_pton.c
@@ -20,11 +20,21 @@
#ifndef HAVE_INET_PTON
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
#include <string.h>
#include <errno.h>
diff --git a/lib/inet_pton.h b/lib/inet_pton.h
index d758e06d2..019cd3269 100644
--- a/lib/inet_pton.h
+++ b/lib/inet_pton.h
@@ -27,6 +27,9 @@
#ifdef HAVE_INET_PTON
#define Curl_inet_pton(x,y,z) inet_pton(x,y,z)
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
#else
int Curl_inet_pton(int, const char *, void *);
#endif