diff options
Diffstat (limited to 'compat/snprintf.c')
-rw-r--r-- | compat/snprintf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/snprintf.c b/compat/snprintf.c index 357e733074..6c0fb056a5 100644 --- a/compat/snprintf.c +++ b/compat/snprintf.c @@ -6,8 +6,12 @@ * number of characters to write without the trailing NUL. */ #ifndef SNPRINTF_SIZE_CORR +#if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ < 4 +#define SNPRINTF_SIZE_CORR 1 +#else #define SNPRINTF_SIZE_CORR 0 #endif +#endif #undef vsnprintf int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap) |