From 24541810e02d7516f646575484d80ec19bf0a8de Mon Sep 17 00:00:00 2001 From: enami Date: Tue, 20 Jan 2015 00:04:58 +0000 Subject: Fix -O option to produce correct pcap file when time_t is 64bit. As described in pcap.h, pcap_pkthdr is not suitable for on-disk format. --- net/tcptrace/distinfo | 3 ++- net/tcptrace/patches/patch-tcpdump.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 net/tcptrace/patches/patch-tcpdump.c (limited to 'net/tcptrace') diff --git a/net/tcptrace/distinfo b/net/tcptrace/distinfo index 9bf1dc4c5f0..a43ccb5efa7 100644 --- a/net/tcptrace/distinfo +++ b/net/tcptrace/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2011/12/07 15:18:51 joerg Exp $ +$NetBSD: distinfo,v 1.9 2015/01/20 00:04:58 enami Exp $ SHA1 (tcptrace-6.6.7.tar.gz) = ae4d10a0829c57f2eda17e63f593e558f52b7f24 RMD160 (tcptrace-6.6.7.tar.gz) = 1dd0f373f766322343ffad59d0655eba4c6682e0 @@ -7,3 +7,4 @@ SHA1 (patch-aa) = a17e39cd2a944c3f439849feeb0eb0b957cd97b2 SHA1 (patch-filt__parser.y) = ac7c510d6bf231496e9c6b459c7a97d98531dbaf SHA1 (patch-filter.c) = 3058ee8b08ceca99b38ae772b51d26df91de6d9c SHA1 (patch-filter.h) = 6e8170f63938e4e3b2c8c97ea9361d707af2f8bb +SHA1 (patch-tcpdump.c) = 4079d257814d966aca2c290fc131bef82ad15fe2 diff --git a/net/tcptrace/patches/patch-tcpdump.c b/net/tcptrace/patches/patch-tcpdump.c new file mode 100644 index 00000000000..dea49c69ba6 --- /dev/null +++ b/net/tcptrace/patches/patch-tcpdump.c @@ -0,0 +1,20 @@ +$NetBSD: patch-tcpdump.c,v 1.1 2015/01/20 00:04:58 enami Exp $ + +--- tcpdump.c.orig 2004-10-07 20:07:30.000000000 +0000 ++++ tcpdump.c +@@ -420,7 +420,14 @@ PcapSavePacket( + void *plast) + { + static MFILE *f_savefile = NULL; +- struct pcap_pkthdr phdr; ++ struct { ++ struct { ++ tt_int32 tv_sec; ++ tt_int32 tv_usec; ++ } ts; ++ tt_uint32 caplen; ++ tt_uint32 len; ++ } phdr; + int wlen; + + if (f_savefile == NULL) { -- cgit v1.2.3