Code

Merge branch 'tr/maint-bundle-long-subject'
[git.git] / compat / inet_pton.c
index 4078fc0877ca99c82152acdd6b7a9eef70a9f8a4..2b9a0a4e22fa5256575b6b184a16fc93ee47869e 100644 (file)
  * 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)