summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/libpcap/Makefile1
-rw-r--r--net/libpcap/files/patch-gencode.c20
-rw-r--r--net/libpcap/files/patch-pcap_bpf.h13
3 files changed, 34 insertions, 0 deletions
diff --git a/net/libpcap/Makefile b/net/libpcap/Makefile
index c04ddbff131f..5be5227c71b5 100644
--- a/net/libpcap/Makefile
+++ b/net/libpcap/Makefile
@@ -2,6 +2,7 @@
PORTNAME= libpcap
PORTVERSION= 1.10.1
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.tcpdump.org/release/
diff --git a/net/libpcap/files/patch-gencode.c b/net/libpcap/files/patch-gencode.c
new file mode 100644
index 000000000000..5f626d26ab32
--- /dev/null
+++ b/net/libpcap/files/patch-gencode.c
@@ -0,0 +1,20 @@
+--- gencode.c.orig 2021-06-07 20:21:35 UTC
++++ gencode.c
+@@ -59,10 +59,16 @@
+ #include <sys/socket.h>
+ #include <net/if.h>
+ #include <net/pfvar.h>
+-#include <net/if_pflog.h>
+ #endif /* HAVE_NET_PFVAR_H */
+
+ #include "pcap-int.h"
++
++#ifdef HAVE_NET_PFVAR_H
++/* FreeBSD includes <net/bpf.h> from <net/if_pflog.h>, and indirectly includes
++ * <net/dlt.h>. The FreeBSD version lacks DLT_IEEE802_15_4_TAP, so we really
++ * want to use our own version. */
++#include <net/if_pflog.h>
++#endif /* HAVE_NET_PFVAR_H */
+
+ #include "extract.h"
+
diff --git a/net/libpcap/files/patch-pcap_bpf.h b/net/libpcap/files/patch-pcap_bpf.h
new file mode 100644
index 000000000000..96679e5d5727
--- /dev/null
+++ b/net/libpcap/files/patch-pcap_bpf.h
@@ -0,0 +1,13 @@
+--- pcap/bpf.h.orig 2021-06-07 20:21:35 UTC
++++ pcap/bpf.h
+@@ -78,6 +78,10 @@
+ */
+ #if !defined(_NET_BPF_H_) && !defined(_NET_BPF_H_INCLUDED) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h)
+ #define lib_pcap_bpf_h
++#define _NET_BPF_H_
++#define _NET_BPF_H_INCLUDED
++#define _BPF_H_
++#define _H_BPF
+
+ #include <pcap/funcattrs.h>
+