Commit 197041f1 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

ws2_32: Set SO_REUSEPORT in addition to SO_REUSEADDR on MacOS.

parent 24b66842
......@@ -4452,6 +4452,15 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
if (setsockopt(fd, level, optname, optval, optlen) == 0)
{
#ifdef __APPLE__
if (level == SOL_SOCKET && optname == SO_REUSEADDR &&
setsockopt(fd, level, SO_REUSEPORT, optval, optlen) != 0)
{
SetLastError(wsaErrno());
release_sock_fd( s, fd );
return SOCKET_ERROR;
}
#endif
release_sock_fd( s, fd );
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment