1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-03 11:12:13 +00:00

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
This commit is contained in:
Eugene Grosbein 2022-10-12 06:19:42 +07:00
parent 8fc6b69f47
commit 9d82137e7e
No known key found for this signature in database
GPG Key ID: B0CD1AF226988B28
2 changed files with 14 additions and 1 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= mpd
DISTVERSION= 5.9
PORTREVISION= 11
PORTREVISION= 12
CATEGORIES= net
MASTER_SITES= SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION}
PKGNAMESUFFIX= 5

View File

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