diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2022-08-31 13:41:53 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2022-08-31 13:41:53 +0000 |
commit | 96703d22162836130ce696d99faa2a451db2b592 (patch) | |
tree | fab532d35081b06656c2dba1be05a753f9094285 | |
parent | 976d9d5dd7bf15a4f9e1eef1dc1e2e062f4f2f24 (diff) | |
download | ports-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/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/ipacctd/files/patch-src_ipacctd.c | 14 |
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) |