From a498a4fe058ffa0f69992f6684c3303cf0b86cb0 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 21 Sep 2017 00:51:03 +0200 Subject: [PATCH] Make vsnprintf() portab function more portable --- src/portab/portab.h | 2 ++ src/portab/vsnprintf.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/portab/portab.h b/src/portab/portab.h index 70d5ed3e..ee353eb1 100644 --- a/src/portab/portab.h +++ b/src/portab/portab.h @@ -159,9 +159,11 @@ extern char * strtok_r PARAMS((char *str, const char *delim, char **saveptr)); #endif #ifndef HAVE_VSNPRINTF +#ifdef PROTOTYPES #include extern int vsnprintf PARAMS(( char *str, size_t count, const char *fmt, va_list args )); #endif +#endif #ifndef HAVE_GAI_STRERROR # define gai_strerror(r) "unknown error" diff --git a/src/portab/vsnprintf.c b/src/portab/vsnprintf.c index 4c65db1f..b740eca5 100644 --- a/src/portab/vsnprintf.c +++ b/src/portab/vsnprintf.c @@ -82,7 +82,11 @@ #include #endif #include +#ifdef PROTOTYPES #include +#else +#include +#endif #ifdef HAVE_STDLIB_H #include #endif -- 2.39.2