From 94d2bf7fcc3721b6eae23613ead037ef47e37fcb Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Tue, 5 Jun 2018 14:19:33 +0200 Subject: [PATCH] Include conditionally in netdissect-alloc.c This should suppress the warning reported by Gisle Vanem: In file included from netdissect-alloc.c:18: In file included from ./netdissect-alloc.h:22: ./netdissect.h(131,14): warning: '_strdup' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport] extern char *strdup (const char *str); ^ ./netdissect-stdinc.h(219,18): note: expanded from macro 'strdup' #define strdup _strdup ^ --- netdissect-alloc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/netdissect-alloc.c b/netdissect-alloc.c index 1a40b09c..bbae56ee 100644 --- a/netdissect-alloc.c +++ b/netdissect-alloc.c @@ -14,6 +14,10 @@ * FOR A PARTICULAR PURPOSE. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "netdissect-alloc.h" -- 2.39.5