diff options
-rw-r--r-- | CHANGES | 2 | ||||
-rwxr-xr-x | build.sh | 14 | ||||
-rw-r--r-- | gencode.c | 9 | ||||
-rw-r--r-- | gencode.h | 1 | ||||
-rw-r--r-- | grammar.y.in | 9 | ||||
-rw-r--r-- | pcap/bpf.h | 2 | ||||
-rw-r--r-- | scanner.l | 11 |
7 files changed, 38 insertions, 10 deletions
@@ -4,7 +4,7 @@ Monthday, Month DD, YYYY: Building and testing: Handle some Autoconf/make errors better. Fix "make releasetar" on AIX, OpenBSD and Solaris. - Fix compiling on Solaris 9. + Fix compiling on Solaris 9/SPARC and 11/AMD64. Address assorted compiler warnings. Monthday, Month DD, YYYY: @@ -50,6 +50,20 @@ clang-*/NetBSD-*) # 'long' to 'suseconds_t' (aka 'int') [-Wshorten-64-to-32] LIBPCAP_TAINTED=yes ;; +clang-*/SunOS-5.11) + # pcap-bpf.c:1044:18: warning: implicit conversion loses integer precision: + # 'uint64_t' (aka 'unsigned long') to 'u_int' (aka 'unsigned int') + # [-Wshorten-64-to-32] + # pcap-bpf.c:1045:18: warning: implicit conversion loses integer precision: + # 'uint64_t' (aka 'unsigned long') to 'u_int' (aka 'unsigned int') + # [-Wshorten-64-to-32] + # pcap-bpf.c:1843:22: warning: implicit conversion loses integer precision: + # 'long' to 'int' [-Wshorten-64-to-32] + # fad-getad.c:266:52: warning: implicit conversion loses integer precision: + # 'uint64_t'(aka 'unsigned long') to 'bpf_u_int32' (aka 'unsigned int') + # [-Wshorten-64-to-32] + [ "`uname -p`" = i386 ] && LIBPCAP_TAINTED=yes + ;; esac # shellcheck disable=SC2006 [ "$LIBPCAP_TAINTED" != yes ] && CFLAGS=`cc_werr_cflags` @@ -24,6 +24,13 @@ #include <config.h> #endif +/* + * grammar.h requires gencode.h and sometimes breaks in a polluted namespace + * (see ftmacros.h), so include it early. + */ +#include "gencode.h" +#include "grammar.h" + #include <pcap-types.h> #ifdef _WIN32 #include <ws2tcpip.h> @@ -69,7 +76,6 @@ #include "ethertype.h" #include "nlpid.h" #include "llc.h" -#include "gencode.h" #include "ieee80211.h" #include "atmuni31.h" #include "sunatmpos.h" @@ -79,7 +85,6 @@ #include "arcnet.h" #include "diag-control.h" -#include "grammar.h" #include "scanner.h" #if defined(linux) @@ -23,6 +23,7 @@ #define gencode_h #include "pcap/funcattrs.h" +#include "pcap/bpf.h" /* bpf_u_int32 */ /* * ATM support: diff --git a/grammar.y.in b/grammar.y.in index 2fbd8615..f8d336ea 100644 --- a/grammar.y.in +++ b/grammar.y.in @@ -71,6 +71,13 @@ #include <config.h> #endif +/* + * grammar.h requires gencode.h and sometimes breaks in a polluted namespace + * (see ftmacros.h), so include it early. + */ +#include "gencode.h" +#include "grammar.h" + #include <stdlib.h> #ifndef _WIN32 @@ -92,8 +99,6 @@ struct rtentry; #include "pcap-int.h" -#include "gencode.h" -#include "grammar.h" #include "scanner.h" #ifdef HAVE_NET_PFVAR_H @@ -80,7 +80,7 @@ #define lib_pcap_bpf_h #include <pcap/funcattrs.h> - +#include <pcap-types.h> /* u_char, u_short and u_int */ #include <pcap/dlt.h> #ifdef __cplusplus @@ -24,6 +24,13 @@ */ #include <pcap/pcap-inttypes.h> +/* + * grammar.h requires gencode.h and sometimes breaks in a polluted namespace + * (see ftmacros.h), so include it early. + */ +#include "gencode.h" +#include "grammar.h" + #include "diag-control.h" } @@ -89,10 +96,6 @@ #include "pcap-int.h" -#include "gencode.h" - -#include "grammar.h" - /* * Earlier versions of Flex don't declare these, so we declare them * ourselves to squelch warnings. |