aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2022-08-31 13:41:53 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2022-08-31 13:41:53 +0000
commit96703d22162836130ce696d99faa2a451db2b592 (patch)
treefab532d35081b06656c2dba1be05a753f9094285
parent976d9d5dd7bf15a4f9e1eef1dc1e2e062f4f2f24 (diff)
downloadports-96703d22162836130ce696d99faa2a451db2b592.tar.gz
ports-96703d22162836130ce696d99faa2a451db2b592.zip
net-mgmt/ipacctd: use PF_DIVERT on FreeBSD 14
to avoid runtime warning. Approved by: mikael
-rw-r--r--net-mgmt/ipacctd/Makefile1
-rw-r--r--net-mgmt/ipacctd/files/patch-src_ipacctd.c14
2 files changed, 15 insertions, 0 deletions
diff --git a/net-mgmt/ipacctd/Makefile b/net-mgmt/ipacctd/Makefile
index 4675469a1dc2..42dc70c29457 100644
--- a/net-mgmt/ipacctd/Makefile
+++ b/net-mgmt/ipacctd/Makefile
@@ -1,5 +1,6 @@
PORTNAME= ipacctd
PORTVERSION= 1.47
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= LOCAL/skv
diff --git a/net-mgmt/ipacctd/files/patch-src_ipacctd.c b/net-mgmt/ipacctd/files/patch-src_ipacctd.c
new file mode 100644
index 000000000000..8fd8c9e490d5
--- /dev/null
+++ b/net-mgmt/ipacctd/files/patch-src_ipacctd.c
@@ -0,0 +1,14 @@
+--- src/ipacctd.c.orig 2022-08-30 21:59:34 UTC
++++ src/ipacctd.c
+@@ -232,7 +232,11 @@
+
+ ds.sin_family = AF_INET;
+
++#ifdef PF_DIVERT
++ if ((spkt = socket(PF_DIVERT, SOCK_RAW, 0)) == -1)
++#else
+ if ((spkt = socket(PF_INET, SOCK_RAW, IPPROTO_DIVERT)) == -1)
++#endif
+ err(1, "socket(IP_DIVERT)");
+
+ if ((bind(spkt, (struct sockaddr *)&ds, sizeof(ds))) == -1)