summaryrefslogtreecommitdiff
path: root/compat/inet_pton.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/inet_pton.c')
-rw-r--r--compat/inet_pton.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/compat/inet_pton.c b/compat/inet_pton.c
index 4078fc0877..2b9a0a4e22 100644
--- a/compat/inet_pton.c
+++ b/compat/inet_pton.c
@@ -15,13 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <stdio.h>
-#include <string.h>
+#include "../git-compat-util.h"
#ifndef NS_INT16SZ
#define NS_INT16SZ 2
@@ -41,7 +35,9 @@
*/
static int inet_pton4(const char *src, unsigned char *dst);
+#ifndef NO_IPV6
static int inet_pton6(const char *src, unsigned char *dst);
+#endif
/* int
* inet_pton4(src, dst)