Commit 37fdbf9a authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

wbemprox: Use WS_AF_INET instead of AF_INET in get_ipsubnet.

parent 3467d71c
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#ifdef __MINGW32__ #ifdef __MINGW32__
# include "winsock2.h" # include "winsock2.h"
# include "ws2tcpip.h" # include "ws2tcpip.h"
# define WS_AF_INET AF_INET
# define WS_AF_UNSPEC AF_UNSPEC # define WS_AF_UNSPEC AF_UNSPEC
# define WS_NI_MAXHOST NI_MAXHOST # define WS_NI_MAXHOST NI_MAXHOST
# define WS_NI_NAMEREQD NI_NAMEREQD # define WS_NI_NAMEREQD NI_NAMEREQD
...@@ -2496,14 +2497,14 @@ static struct array *get_ipsubnet( IP_ADAPTER_UNICAST_ADDRESS_LH *list ) ...@@ -2496,14 +2497,14 @@ static struct array *get_ipsubnet( IP_ADAPTER_UNICAST_ADDRESS_LH *list )
} }
for (address = list; address; address = address->Next) for (address = list; address; address = address->Next)
{ {
if (address->Address.lpSockaddr->sa_family == AF_INET) if (address->Address.lpSockaddr->sa_family == WS_AF_INET)
{ {
WCHAR buf[INET_ADDRSTRLEN]; WCHAR buf[INET_ADDRSTRLEN];
SOCKADDR_IN addr; SOCKADDR_IN addr;
ULONG buflen = sizeof(buf)/sizeof(buf[0]); ULONG buflen = sizeof(buf)/sizeof(buf[0]);
memset( &addr, 0, sizeof(addr) ); memset( &addr, 0, sizeof(addr) );
addr.sin_family = AF_INET; addr.sin_family = WS_AF_INET;
if (ConvertLengthToIpv4Mask( address->OnLinkPrefixLength, &addr.sin_addr.S_un.S_addr ) != NO_ERROR if (ConvertLengthToIpv4Mask( address->OnLinkPrefixLength, &addr.sin_addr.S_un.S_addr ) != NO_ERROR
|| WSAAddressToStringW( (SOCKADDR*)&addr, sizeof(addr), NULL, buf, &buflen)) || WSAAddressToStringW( (SOCKADDR*)&addr, sizeof(addr), NULL, buf, &buflen))
ptr[i] = NULL; ptr[i] = NULL;
......
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