git: 9d82137e7e7f - main - net/mpd5: do not use negative value for socket backlog
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 11 Oct 2022 23:27:58 UTC
The branch main has been updated by eugen:
URL: https://cgit.FreeBSD.org/ports/commit/?id=9d82137e7e7f1fef804e31bbe52fb8161a868b01
commit 9d82137e7e7f1fef804e31bbe52fb8161a868b01
Author: Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2022-10-11 23:19:42 +0000
Commit: Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2022-10-11 23:27:51 +0000
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
---
net/mpd5/Makefile | 2 +-
net/mpd5/files/patch-listen | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
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);