summaryrefslogtreecommitdiff
path: root/gencode.h
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2021-08-11 00:17:19 +0100
committerDenis Ovsienko <denis@ovsienko.info>2021-08-11 00:17:19 +0100
commit0c21cb27e629288925f378994eb47a1d90279eab (patch)
treeb6f6629b9cadbd744e7df2f24938d5482b952fc6 /gencode.h
parent02bc5d9fca019a71c8148790686dc81728d778e4 (diff)
downloadlibpcap-0c21cb27e629288925f378994eb47a1d90279eab.tar.gz
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).
Diffstat (limited to 'gencode.h')
-rw-r--r--gencode.h1
1 files changed, 1 insertions, 0 deletions
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: