summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-12 15:34:36 -0700
committerJunio C Hamano <gitster@pobox.com>2016-09-12 15:34:36 -0700
commit27853a85edce65afd73c8bb0ca7adf0a4468def3 (patch)
treec2afb3b465f0d1ed53089e137960ee8ad82e3a7a /git-compat-util.h
parentd1de693d0d83b2d0d12320312ae523c7711bf627 (diff)
parentca2baa3f7532dfe1816b623f39489ed10f3c9a49 (diff)
downloadgit-27853a85edce65afd73c8bb0ca7adf0a4468def3.tar.gz
Merge branch 'rs/compat-strdup'
* rs/compat-strdup: compat: move strdup(3) replacement to its own file
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 2ad45b3f75..68615b1a6a 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -664,6 +664,14 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
const void *needle, size_t needlelen);
#endif
+#ifdef OVERRIDE_STRDUP
+#ifdef strdup
+#undef strdup
+#endif
+#define strdup gitstrdup
+char *gitstrdup(const char *s);
+#endif
+
#ifdef NO_GETPAGESIZE
#define getpagesize() sysconf(_SC_PAGESIZE)
#endif