aboutsummaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorMike Pape <dotzenlabs@gmail.com>2010-11-04 02:35:11 +0100
committerJunio C Hamano <gitster@pobox.com>2010-11-04 16:53:49 -0700
commitda523cc597b1be7fe61ee870cf93b142e70fab7f (patch)
tree38149dba3a2f29a898352874895bd03f4d79649d /git-compat-util.h
parent088d880247dc7bb1a27f07e320bab7f9b63e06bc (diff)
downloadgit-da523cc597b1be7fe61ee870cf93b142e70fab7f.tar.gz
git-da523cc597b1be7fe61ee870cf93b142e70fab7f.tar.xz
compat: add inet_pton and inet_ntop prototypes
Windows doesn't have inet_pton and inet_ntop, so add prototypes in git-compat-util.h for them. At the same time include git-compat-util.h in the sources for these functions, so they use the network-wrappers from there on Windows. Signed-off-by: Mike Pape <dotzenlabs@gmail.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index e19283196..56dce8588 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -387,6 +387,14 @@ static inline void *gitmempcpy(void *dest, const void *src, size_t n)
}
#endif
+#ifdef NO_INET_PTON
+int inet_pton(int af, const char *src, void *dst);
+#endif
+
+#ifdef NO_INET_NTOP
+const char *inet_ntop(int af, const void *src, char *dst, size_t size);
+#endif
+
extern void release_pack_memory(size_t, int);
typedef void (*try_to_free_t)(size_t);