1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

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
This commit is contained in:
Alexey Dokuchaev 2024-02-26 12:38:22 +00:00
parent 5b028486ae
commit c3fa992452
2 changed files with 31 additions and 2 deletions

View File

@ -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

View File

@ -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