]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Include conditionally <config.h> in netdissect-alloc.c
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 5 Jun 2018 12:19:33 +0000 (14:19 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 5 Jun 2018 12:38:15 +0000 (14:38 +0200)
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

index 1a40b09c12556bfb050dac948545cdb6c9ca0495..bbae56ee831e4204c403f8727d389ab4c146f92e 100644 (file)
  * FOR A PARTICULAR PURPOSE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <stdlib.h>
 #include "netdissect-alloc.h"