summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2022-10-12 06:19:42 +0700
committerEugene Grosbein <eugen@FreeBSD.org>2022-10-12 06:27:51 +0700
commit9d82137e7e7f1fef804e31bbe52fb8161a868b01 (patch)
treef04123851eeb1a930fa5aa40d95223f790168ee1
parentsecurity/putty: fix aarch64 build on clang 10. (diff)
net/mpd5: do not use negative value for socket backlog
Import r2463 from upstream. As per POSIX, supply INT_MAX for listen(2) to use system default. This changed in preparation for FreeBSD 14. See also: https://reviews.freebsd.org/D31821
-rw-r--r--net/mpd5/Makefile2
-rw-r--r--net/mpd5/files/patch-listen13
2 files changed, 14 insertions, 1 deletions
diff --git a/net/mpd5/Makefile b/net/mpd5/Makefile
index 8ecb88614119..2d605bfabff0 100644
--- a/net/mpd5/Makefile
+++ b/net/mpd5/Makefile
@@ -1,6 +1,6 @@
PORTNAME= mpd
DISTVERSION= 5.9
-PORTREVISION= 11
+PORTREVISION= 12
CATEGORIES= net
MASTER_SITES= SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION}
PKGNAMESUFFIX= 5
diff --git a/net/mpd5/files/patch-listen b/net/mpd5/files/patch-listen
new file mode 100644
index 000000000000..69ab898efea8
--- /dev/null
+++ b/net/mpd5/files/patch-listen
@@ -0,0 +1,13 @@
+Index: src/util.c
+===================================================================
+--- src/util.c (revision 2462)
++++ src/util.c (revision 2463)
+@@ -982,7 +982,7 @@ TcpGetListenPort(struct u_addr *addr, in_port_t port,
+
+ /* Make socket available for connections */
+
+- if (listen(sock, -1) < 0)
++ if (listen(sock, INT_MAX) < 0)
+ {
+ Perror("%s: listen", __FUNCTION__);
+ (void) close(sock);