Commit e521ee2c authored by Kai Blin's avatar Kai Blin Committed by Alexandre Julliard

ws2_32: Implement SO_EXCLUSIVEADDRUSE for setsockopt.

parent 8de12580
......@@ -2729,6 +2729,15 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
return 0;
}
/* SO_EXCLUSIVEADDRUSE stops applications from binding to a port that is
* already used. This never works on Unix systems, so just ignore this
* setting*/
if ( level == WS_SOL_SOCKET && optname == WS_SO_EXCLUSIVEADDRUSE )
{
TRACE("Ignoring SO_EXCLUSIVEADDRUSE\n");
return 0;
}
#ifdef HAVE_IPX
if(level == NSPROTO_IPX)
{
......
......@@ -663,6 +663,7 @@ typedef struct WS(WSAData)
#define SO_DEBUG 0x0001
#define SO_ACCEPTCONN 0x0002
#define SO_REUSEADDR 0x0004
#define SO_EXCLUSIVEADDRUSE ((u_int)(~SO_REUSEADDR))
#define SO_KEEPALIVE 0x0008
#define SO_DONTROUTE 0x0010
#define SO_BROADCAST 0x0020
......@@ -696,6 +697,7 @@ typedef struct WS(WSAData)
#define WS_SO_DEBUG 0x0001
#define WS_SO_ACCEPTCONN 0x0002
#define WS_SO_REUSEADDR 0x0004
#define WS_SO_EXCLUSIVEADDRUSE ((WS_u_int)(~WS_SO_REUSEADDR))
#define WS_SO_KEEPALIVE 0x0008
#define WS_SO_DONTROUTE 0x0010
#define WS_SO_BROADCAST 0x0020
......
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