net/tcpmssd: use PF_DIVERT on FreeBSD 14

to avoid runtime warning.

Approved by:	mikael
This commit is contained in:
Gleb Smirnoff 2022-08-31 06:41:43 -07:00
parent 36c17ed04d
commit 976d9d5dd7
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= tcpmssd
PORTVERSION= 1.1
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= # none
DISTFILES= # none

View File

@ -123,7 +123,11 @@ main(int argc, char *argv[])
/* NOTREACHED */
}
#ifdef PF_DIVERT
if ((s = socket(PF_DIVERT, SOCK_RAW, 0)) == -1) {
#else
if ((s = socket(PF_INET, SOCK_RAW, IPPROTO_DIVERT)) == -1) {
#endif
err(1, "can't create divert socket");
/* NOTREACHED */
}