mirror of
https://github.com/SwallowOS/xorg_lib_libxtrans
synced 2025-11-03 21:42:11 +08:00
patch xtrans.diff
This commit is contained in:
6
Xtrans.c
6
Xtrans.c
@@ -1233,9 +1233,9 @@ TRANS(MakeAllCOTSServerListeners) (const char *port, int *partial,
|
||||
continue;
|
||||
}
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
if ((Xtransports[i].transport_id == TRANS_SOCKET_INET_INDEX
|
||||
&& ipv6_succ))
|
||||
flags |= ADDR_IN_USE_ALLOWED;
|
||||
// if ((Xtransports[i].transport_id == TRANS_SOCKET_INET_INDEX
|
||||
// && ipv6_succ))
|
||||
// flags |= ADDR_IN_USE_ALLOWED;
|
||||
#endif
|
||||
|
||||
if ((status = TRANS(CreateListener (ciptr, port, flags))) < 0)
|
||||
|
||||
@@ -640,7 +640,7 @@ TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, const char *protocol,
|
||||
* Using this prevents the bind() check for an existing server listening
|
||||
* on the same port, but it is required for other reasons.
|
||||
*/
|
||||
#ifdef SO_REUSEADDR
|
||||
#if 1 //#ifdef SO_REUSEADDR
|
||||
|
||||
/*
|
||||
* SO_REUSEADDR only applied to AF_INET && AF_INET6
|
||||
@@ -655,6 +655,8 @@ TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, const char *protocol,
|
||||
int one = 1;
|
||||
setsockopt (ciptr->fd, SOL_SOCKET, SO_REUSEADDR,
|
||||
(char *) &one, sizeof (int));
|
||||
setsockopt (ciptr->fd, SOL_SOCKET, SO_REUSEPORT,
|
||||
(char *) &one, sizeof (int));
|
||||
}
|
||||
#endif
|
||||
#ifdef IPV6_V6ONLY
|
||||
|
||||
Reference in New Issue
Block a user