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.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/compat/inet_pton.c b/compat/inet_pton.c
index 5704e0d2b6..2b9a0a4e22 100644
--- a/compat/inet_pton.c
+++ b/compat/inet_pton.c
@@ -15,14 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.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
@@ -42,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)