From: Alexander Barton Date: Wed, 20 Sep 2017 22:51:03 +0000 (+0200) Subject: Make vsnprintf() portab function more portable X-Git-Url: https://arthur.barton.de/gitweb/?p=ngircd-alex.git;a=commitdiff_plain;h=a498a4fe058ffa0f69992f6684c3303cf0b86cb0 Make vsnprintf() portab function more portable --- 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