From: Denis Ovsienko Date: Wed, 15 Feb 2023 09:20:02 +0000 (+0000) Subject: Include from netdissect.h. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/695ce83d0ad8eeaec1e1dec218279ac2d2168189 Include from netdissect.h. netdissect.h since commit 7578e1c requires for struct tm. The dependency is difficult to notice because the warning pops up when compiling strdup.c only and only on Linux, and Linux most certainly has strdup(), so normally strdup.c is never compiled on Linux. Make it correct anyway to eliminate a space for future surprises in other files. $ make strdup.o In file included from ./missing/strdup.c:38: ./netdissect.h:441:38: warning: 'struct tm' declared inside parameter list will not be visible outside of this definition or declaration gcc (Debian 10.2.1-6) 10.2.1 20210110 --- diff --git a/netdissect.h b/netdissect.h index d953a464..aa6dfe5b 100644 --- a/netdissect.h +++ b/netdissect.h @@ -30,6 +30,7 @@ #endif #include #include +#include #include "status-exit-codes.h" #include "funcattrs.h" /* for PRINTFLIKE_FUNCPTR() */ #include "diag-control.h" /* for ND_UNREACHABLE */ diff --git a/print-ntp.c b/print-ntp.c index 499585fd..f4ea80f6 100644 --- a/print-ntp.c +++ b/print-ntp.c @@ -38,8 +38,6 @@ #include "netdissect-stdinc.h" -#include - #define ND_LONGJMP_FROM_TCHECK #include "netdissect.h" #include "addrtoname.h"