]> The Tcpdump Group git mirrors - tcpdump/commitdiff
netdissect.h requires funcattrs.h
authorDenis Ovsienko <[email protected]>
Thu, 29 Jul 2021 20:12:06 +0000 (21:12 +0100)
committerDenis Ovsienko <[email protected]>
Thu, 29 Jul 2021 20:12:06 +0000 (21:12 +0100)
...because the former uses PRINTFLIKE_FUNCPTR().  However, it didn't
have the #include.  However, the problem was not visible because most
files that included netdissect.h also included (directly or through
another header) funcattrs.h beforehand.  The only exceptions were the
following two files, which apparently have not been compiled anywhere
for a long time:

In file included from missing/strdup.c:38:
./netdissect.h:254:8: error: expected ':', ',', ';', '}' or
'__attribute__' before 'PRINTFLIKE_FUNCPTR'

In file included from missing/snprintf.c:45:
./netdissect.h:254:8: error: expected ':', ',', ';', '}' or
'__attribute__' before 'PRINTFLIKE_FUNCPTR'

Add the missing #include to netdissect.h to eliminate this space for
failure.

netdissect.h

index 644997d8bb3353567c7d7b0d90ff1c567452902c..d9b3f853dc46825a6cd16807010b95f197973c75 100644 (file)
@@ -31,6 +31,7 @@
 #include <sys/types.h>
 #include <setjmp.h>
 #include "status-exit-codes.h"
+#include "funcattrs.h" /* for PRINTFLIKE_FUNCPTR() */
 
 /*
  * Data types corresponding to multi-byte integral values within data