Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
compat: move strdup(3) replacement to its own file
[gitweb.git]
/
git-compat-util.h
diff --git
a/git-compat-util.h
b/git-compat-util.h
index 49d4029b8dddcb06dc6bea3d5f47c020785e3ddf..fd4c814c705c935be132c739f815d0a3f9892f15 100644
(file)
--- a/
git-compat-util.h
+++ b/
git-compat-util.h
@@
-646,6
+646,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