dump: fix compilation on CentOS 7
Refs: #4852
Change-Id: I2550d26f709f645ee3d6b2e0f63a6698525e1a76
diff --git a/tools/dump/wscript b/tools/dump/wscript
index cd9971b..df23de9 100644
--- a/tools/dump/wscript
+++ b/tools/dump/wscript
@@ -4,6 +4,14 @@
def configure(conf):
conf.check_cfg(package='libpcap', uselib_store='PCAP',
path='pcap-config', args='--libs --cflags')
+ conf.check_cxx(msg='Checking if struct tcphdr has member th_off ',
+ define_name='HAVE_BSD_TCPHDR', mandatory=False,
+ fragment='''#include <netinet/tcp.h>
+ int main() { tcphdr th; th.th_off; }''')
+ conf.check_cxx(msg='Checking if struct udphdr has member uh_ulen',
+ define_name='HAVE_BSD_UDPHDR', mandatory=False,
+ fragment='''#include <netinet/udp.h>
+ int main() { udphdr uh; uh.uh_ulen; }''')
def build(bld):
bld.objects(