]> 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)
committerGuy Harris <[email protected]>
Sun, 17 Jul 2022 02:55:23 +0000 (19:55 -0700)
...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.

(cherry picked from commit 0a29523dfcab768d665e9336704ddf35e8bd5462)

netdissect.h

index 09f64dac790e18aa2c0f582baaafbe1ae690c88c..f63a5fdfb343825cda3b7420325b4159b45338de 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