gallium/util: don't depend on implementation defined behavior in listen()
authorLucas Stach <l.stach@pengutronix.de>
Mon, 16 Sep 2019 12:43:13 +0000 (14:43 +0200)
committerLucas Stach <dev@lynxeye.de>
Fri, 18 Oct 2019 10:12:07 +0000 (10:12 +0000)
commitf6461df63a9e3e5f215a03a8fb8f2d4d41152007
tree14f2a0e49b7ef9ec992b7180cbc619e55c554662
parent5be5b53b6d6e59acb683644cdab533fd80b00713
gallium/util: don't depend on implementation defined behavior in listen()

Using 0 as the backlog argument to listen() is exploiting implementation
defined behavior and will lead to no connections being accepted on some
libc implementations.

Quote of the listen manpage: "A backlog argument of 0 may allow the socket to
accept connections, in which case the length of the listen queue may be set to
an implementation-defined minimum value."

Fix this by using a more sensible backlog value.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
src/gallium/auxiliary/util/u_network.c