git: f12b97f4a030 - main - net/tcptrace: fix build after libcap change
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 18 Oct 2024 09:04:46 UTC
The branch main has been updated by se: URL: https://cgit.FreeBSD.org/ports/commit/?id=f12b97f4a030d9d64b761e64f37eed21867d4a6a commit f12b97f4a030d9d64b761e64f37eed21867d4a6a Author: Stefan Eßer <se@FreeBSD.org> AuthorDate: 2024-10-18 09:01:12 +0000 Commit: Stefan Eßer <se@FreeBSD.org> CommitDate: 2024-10-18 09:01:12 +0000 net/tcptrace: fix build after libcap change The pcap_offline_read() function is no longer exported from the pcap library, it has become an internal function named pcapint_offline_read(). The pcap_dispatch() function can be used instead in this particular case. Reported by: pkg-fallout --- net/tcptrace/Makefile | 2 +- net/tcptrace/files/patch-tcpdump.c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/net/tcptrace/Makefile b/net/tcptrace/Makefile index 4af48347a4a3..63b41285e685 100644 --- a/net/tcptrace/Makefile +++ b/net/tcptrace/Makefile @@ -1,6 +1,6 @@ PORTNAME= tcptrace PORTVERSION= 6.6.8 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net #MASTER_SITES= http://www.tcptrace.org/download/ diff --git a/net/tcptrace/files/patch-tcpdump.c b/net/tcptrace/files/patch-tcpdump.c index f82fb83b2b38..936c571a965c 100644 --- a/net/tcptrace/files/patch-tcpdump.c +++ b/net/tcptrace/files/patch-tcpdump.c @@ -1,6 +1,16 @@ --- tcpdump.c.orig 2013-07-01 18:43:14 UTC +++ tcpdump.c -@@ -114,10 +114,13 @@ static int callback( +@@ -68,9 +68,6 @@ static char const GCC_UNUSED rcsid[] = + + + +-/* external ref, in case missing in older version */ +-extern int pcap_offline_read(void *, int, pcap_handler, u_char *); +- + /* global pointer, the pcap info header */ + static pcap_t *pcap; + +@@ -114,10 +111,13 @@ static int callback( /* for some reason, the windows version of tcpdump is using */ /* this. It looks just like ethernet to me */ case PCAP_DLT_EN10MB: @@ -15,3 +25,12 @@ case EH_SIZE: /* straight Ethernet encapsulation */ memcpy((char *)ip_buf,buf+offset,iplen-offset); callback_plast = ip_buf+iplen-offset-1; +@@ -250,7 +250,7 @@ pread_tcpdump( + int ret; + + while (1) { +- if ((ret = pcap_offline_read(pcap,1,(pcap_handler)callback,0)) != 1) { ++ if ((ret = pcap_dispatch(pcap,1,(pcap_handler)callback,0)) != 1) { + /* prob EOF */ + + if (ret == -1) {