diff options
-rw-r--r-- | git-compat-util.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 00d41e4f0e..f4cb0a9b01 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -536,7 +536,16 @@ void git_qsort(void *base, size_t nmemb, size_t size, #endif #ifndef va_copy -#define va_copy(dst,src) (dst) = (src) +/* + * Since an obvious implementation of va_list would be to make it a + * pointer into the stack frame, a simple assignment will work on + * many systems. But let's try to be more portable. + */ +#ifdef __va_copy +#define va_copy(dst, src) __va_copy(dst, src) +#else +#define va_copy(dst, src) ((dst) = (src)) +#endif #endif /* |