From 0c21cb27e629288925f378994eb47a1d90279eab Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Wed, 11 Aug 2021 00:17:19 +0100 Subject: Fix compiling on Solaris 11.4/AMD64. In gencode.h and pcap/bpf.h include necessary headers in order not to depend on other files to do so. In gencode.c, grammar.c (via grammar.y.in) and scanner.c (via scanner.l) include gencode.h and grammar.h as early as it takes for the token enum identifiers not to clash with the named constants defined in system headers. This fixes the following error with Clang (also with GCC and a more vague message): ./grammar.h:116:5: error: expected identifier ESP = 326, /usr/include/sys/regset.h:86:14: note: expanded from macro 'ESP' #define ESP 7 In build.sh add an exemption rule for the remaining warnings. Now libpcap can complete the default matrix build (4 rounds with GCC 7.3.0 and 4 rounds with Clang 6.0.0). --- gencode.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gencode.h') diff --git a/gencode.h b/gencode.h index 647946d0..a1748b88 100644 --- a/gencode.h +++ b/gencode.h @@ -23,6 +23,7 @@ #define gencode_h #include "pcap/funcattrs.h" +#include "pcap/bpf.h" /* bpf_u_int32 */ /* * ATM support: -- cgit v1.2.1