From 492f9f525e204d77ca417fb6077c1e573f885431 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wolfgang=20St=C3=B6ggl?= Date: Sun, 27 Jan 2019 01:09:34 +0100 Subject: [PATCH] Fix _errno inconsistent dll linkage (Windows) - Exclude in case of _WIN32 in rrd_snprintf.c: extern int errno; - Fixes warnings: MSVC: rrd_snprintf.c(583): warning C4273: '_errno': inconsistent dll linkage errno.h(19): note: see previous definition of '_errno' MinGW-w64 (gcc): rrd_snprintf.c:583:12: warning: '_errno' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] --- src/rrd_snprintf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rrd_snprintf.c b/src/rrd_snprintf.c index 125ebb83..6f36a9dc 100644 --- a/src/rrd_snprintf.c +++ b/src/rrd_snprintf.c @@ -580,7 +580,9 @@ static UINTMAX_T cast(LDOUBLE); static UINTMAX_T myround(LDOUBLE); static LDOUBLE mypow10(int); +#ifndef _WIN32 /* Avoid warning under Windows */ extern int errno; +#endif int rpl_vsnprintf(char *str, size_t size, const char *format, va_list args) -- 2.47.2