From 1c231bf6dc84160b7c1aed4a3fd04063164e120a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wolfgang=20St=C3=B6ggl?= Date: Sat, 13 Apr 2019 22:34:48 +0200 Subject: [PATCH] Avoid MinGW-w64 strndup compiler warning - Fixes the following MinGW-w64 GCC compiler warning: rrd_create.c:287:14: warning: declaration of 'strndup' shadows a built-in function [-Wshadow] static char *strndup( - MinGW-w64: strndup is not detected by configure, therefore HAVE_STRNDUP is not defined. Use strndup_() here instead of strndup() to avoid any collisions. --- src/rrd_create.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rrd_create.c b/src/rrd_create.c index c2565904..ff501a62 100644 --- a/src/rrd_create.c +++ b/src/rrd_create.c @@ -264,6 +264,8 @@ int rrd_create( } #ifndef HAVE_STRNDUP +/* Avoid MinGW-w64 warning: declaration of 'strndup' shadows a built-in function [-Wshadow] */ +#define strndup strndup_ /* Implement the strndup function. Copyright (C) 2005 Free Software Foundation, Inc. Written by Kaveh R. Ghazi . -- 2.47.2