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:
parent
8fc6b69f47
commit
9d82137e7e
@ -1,6 +1,6 @@
|
||||
PORTNAME= mpd
|
||||
DISTVERSION= 5.9
|
||||
PORTREVISION= 11
|
||||
PORTREVISION= 12
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION}
|
||||
PKGNAMESUFFIX= 5
|
||||
|
13
net/mpd5/files/patch-listen
Normal file
13
net/mpd5/files/patch-listen
Normal 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);
|
Loading…
x
Reference in New Issue
Block a user