Commit 7ca40003 authored by Filip Navara's avatar Filip Navara Committed by Alexandre Julliard

iphlpapi: Use prefixed WS_ structures to avoid misalignment on OS X builds.

Thanks to Hans Leidekker for diagnosing the problem.
parent 0010ee02
......@@ -848,7 +848,7 @@ static ULONG adapterAddressesFromIndex(ULONG family, ULONG flags, IF_INDEX index
if (num_v4addrs)
{
IP_ADAPTER_UNICAST_ADDRESS *ua;
struct sockaddr_in *sa;
struct WS_sockaddr_in *sa;
aa->Flags |= IP_ADAPTER_IPV4_ENABLED;
ua = aa->FirstUnicastAddress = (IP_ADAPTER_UNICAST_ADDRESS *)ptr;
for (i = 0; i < num_v4addrs; i++)
......@@ -860,12 +860,12 @@ static ULONG adapterAddressesFromIndex(ULONG family, ULONG flags, IF_INDEX index
ua->Address.iSockaddrLength = sizeof(struct sockaddr_in);
ua->Address.lpSockaddr = (SOCKADDR *)((char *)ua + ua->u.s.Length);
sa = (struct sockaddr_in *)ua->Address.lpSockaddr;
sa->sin_family = AF_INET;
sa->sin_addr.s_addr = v4addrs[i];
sa->sin_port = 0;
sa = (struct WS_sockaddr_in *)ua->Address.lpSockaddr;
sa->sin_family = WS_AF_INET;
sa->sin_addr.S_un.S_addr = v4addrs[i];
sa->sin_port = 0;
TRACE("IPv4 %d/%d: %s\n", i + 1, num_v4addrs,
debugstr_ipv4(&sa->sin_addr.s_addr, addr_buf));
debugstr_ipv4(&sa->sin_addr.S_un.S_addr, addr_buf));
ptr += ua->u.s.Length + ua->Address.iSockaddrLength;
if (i < num_v4addrs - 1)
......
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