diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2024-02-26 12:38:22 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2024-02-26 12:38:22 +0000 |
commit | c3fa9924529148735c04a0d1c8444b9942e472d3 (patch) | |
tree | 414ba1933a9f7c3071791662dd223ecbd48effd8 | |
parent | 5b028486aefdb38c88779b64a323ae6ead534e25 (diff) | |
download | ports-c3fa9924529148735c04a0d1c8444b9942e472d3.tar.gz ports-c3fa9924529148735c04a0d1c8444b9942e472d3.zip |
net/dante: add missing getsockopt() interposition to fix the build
Discovered with --no-undefined-version being enabled by default in
newish LLD. While here, drop CONFLICTS against `net/socks5' which
was removed from the ports tree back in 2012.
PR: 276938
Reported by: pkg-fallout
-rw-r--r-- | net/dante/Makefile | 2 | ||||
-rw-r--r-- | net/dante/files/patch-dlib_interposition.c | 31 |
2 files changed, 31 insertions, 2 deletions
diff --git a/net/dante/Makefile b/net/dante/Makefile index 458dbabda958..8bbb0261a7b6 100644 --- a/net/dante/Makefile +++ b/net/dante/Makefile @@ -14,8 +14,6 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libminiupnpc.so:net/miniupnpc \ libsasl2.so:security/cyrus-sasl2 -CONFLICTS= socks5 - USES= libtool localbase GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share diff --git a/net/dante/files/patch-dlib_interposition.c b/net/dante/files/patch-dlib_interposition.c new file mode 100644 index 000000000000..cf6b642130d8 --- /dev/null +++ b/net/dante/files/patch-dlib_interposition.c @@ -0,0 +1,31 @@ +--- dlib/interposition.c.orig 2020-11-11 16:11:56 UTC ++++ dlib/interposition.c +@@ -1736,7 +1736,7 @@ getsockopt(s, level, optname, optval, optlen) + HAVE_PROT_GETSOCKOPT_4 optval; + HAVE_PROT_GETSOCKOPT_5 optlen; + { +- if (socks_issyscall(s, SYMBOL_GETSOCKNAME)) ++ if (socks_issyscall(s, SYMBOL_GETSOCKOPT)) + return sys_getsockopt(s, level, optname, optval, optlen); + return Rgetsockopt(s, level, optname, optval, optlen); + } +@@ -2168,6 +2168,19 @@ _getsockname(s, name, namelen) + if (socks_issyscall(s, SYMBOL_GETSOCKNAME)) + return sys_getsockname(s, name, namelen); + return Rgetsockname(s, name, namelen); ++} ++ ++HAVE_PROT_GETSOCKOPT_0 ++_getsockopt(s, level, optname, optval, optlen) ++ HAVE_PROT_GETSOCKOPT_1 s; ++ HAVE_PROT_GETSOCKOPT_2 level; ++ HAVE_PROT_GETSOCKOPT_3 optname; ++ HAVE_PROT_GETSOCKOPT_4 optval; ++ HAVE_PROT_GETSOCKOPT_5 optlen; ++{ ++ if (socks_issyscall(s, SYMBOL_GETSOCKOPT)) ++ return sys_getsockopt(s, level, optname, optval, optlen); ++ return Rgetsockopt(s, level, optname, optval, optlen); + } + + HAVE_PROT_LISTEN_0 |