diff --git a/git-compat-util.h b/git-compat-util.h
index e292926fec2d6910ed8a44bb0501fb6e219af3f9..7e62b552700a580646dbb6a8921c40761d6b57a2 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
#ifdef __GLIBC_PREREQ
#if __GLIBC_PREREQ(2, 1)
#define HAVE_STRCHRNUL
+#define HAVE_MEMPCPY
#endif
#endif
}
#endif
+#ifndef HAVE_MEMPCPY
+#define mempcpy gitmempcpy
+static inline void *gitmempcpy(void *dest, const void *src, size_t n)
+{
+ return (char *)memcpy(dest, src, n) + n;
+}
+#endif
+
extern void release_pack_memory(size_t, int);
extern char *xstrdup(const char *str);