Commit 43241934 authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

ws2_32: Avoid using WS_ prefix on unix sockaddr struct.

The address was already converted to unix in these situations, so it's wrong to check against windows #defines.
parent 3bca22a6
...@@ -2559,7 +2559,7 @@ static BOOL interface_bind( SOCKET s, int fd, struct sockaddr *addr ) ...@@ -2559,7 +2559,7 @@ static BOOL interface_bind( SOCKET s, int fd, struct sockaddr *addr )
DWORD adap_size; DWORD adap_size;
int enable = 1; int enable = 1;
if (bind_addr == htonl(WS_INADDR_ANY) || bind_addr == htonl(WS_INADDR_LOOPBACK)) if (bind_addr == htonl(INADDR_ANY) || bind_addr == htonl(INADDR_LOOPBACK))
return FALSE; /* Not binding to a network adapter, special interface binding unnecessary. */ return FALSE; /* Not binding to a network adapter, special interface binding unnecessary. */
if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &sock_type, &optlen) == -1 || sock_type != SOCK_DGRAM) if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &sock_type, &optlen) == -1 || sock_type != SOCK_DGRAM)
return FALSE; /* Special interface binding is only necessary for UDP datagrams. */ return FALSE; /* Special interface binding is only necessary for UDP datagrams. */
...@@ -2664,10 +2664,10 @@ int WINAPI WS_bind(SOCKET s, const struct WS_sockaddr* name, int namelen) ...@@ -2664,10 +2664,10 @@ int WINAPI WS_bind(SOCKET s, const struct WS_sockaddr* name, int namelen)
* INADDR_ANY instead*/ * INADDR_ANY instead*/
WARN("Trying to bind to magic IP address, using " WARN("Trying to bind to magic IP address, using "
"INADDR_ANY instead.\n"); "INADDR_ANY instead.\n");
in4->sin_addr.s_addr = htonl(WS_INADDR_ANY); in4->sin_addr.s_addr = htonl(INADDR_ANY);
} }
else if (interface_bind(s, fd, &uaddr.addr)) else if (interface_bind(s, fd, &uaddr.addr))
in4->sin_addr.s_addr = htonl(WS_INADDR_ANY); in4->sin_addr.s_addr = htonl(INADDR_ANY);
} }
if (bind(fd, &uaddr.addr, uaddrlen) < 0) if (bind(fd, &uaddr.addr, uaddrlen) < 0)
{ {
...@@ -2725,7 +2725,7 @@ static int do_connect(int fd, const struct WS_sockaddr* name, int namelen) ...@@ -2725,7 +2725,7 @@ static int do_connect(int fd, const struct WS_sockaddr* name, int namelen)
* assuming we really want to connect to localhost */ * assuming we really want to connect to localhost */
TRACE("Trying to connect to magic IP address, using " TRACE("Trying to connect to magic IP address, using "
"INADDR_LOOPBACK instead.\n"); "INADDR_LOOPBACK instead.\n");
in4->sin_addr.s_addr = htonl(WS_INADDR_LOOPBACK); in4->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
} }
} }
......
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