Building tcpdump with CLang recently started to produce 9 warnings per
each .c file along the following lines:
In file included from ./print-pflog.c:39:
In file included from ./netdissect.h:75:
In file included from ../libpcap/pcap.h:43:
In file included from ../libpcap/pcap/pcap.h:72:
../libpcap/pcap/funcattrs.h:115:8: warning: macro expansion producing
'defined' has undefined behavior [-Wexpansion-to-defined]
|| PCAP_IS_AT_LEAST_SUNC_VERSION(5, 9) \
^
../libpcap/pcap/compiler-tests.h:89:3: note: expanded from macro
'PCAP_IS_AT_LEAST_SUNC_VERSION'
(defined(__SUNPRO_C) && \
^
Replace each involved 2-ary macro with one or more 0-ary macro(s) and
use those. This will require to add a new 0-ary macro for each new
required combination of major/minor version numbers of a particular
compiler, but this change makes tcpdump compile almost cleanly again.