mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r15930) -Fix (r15926): MSVC compilation
This commit is contained in:
parent
f9e9708ddc
commit
825aa87e80
@ -79,7 +79,7 @@ static int NetworkFindBroadcastIPsInternal(NetworkAddress *broadcast, int limit)
|
||||
if (ip != INADDR_LOOPBACK && ip != INADDR_ANY) {
|
||||
sockaddr_storage address;
|
||||
memset(&address, 0, sizeof(address));
|
||||
((sockaddr_in*)&storage)->sin_addr.s_addr = htonl(ip | ~netmask);
|
||||
((sockaddr_in*)&address)->sin_addr.s_addr = htonl(ip | ~netmask);
|
||||
broadcast[index] = NetworkAddress(address, sizeof(sockaddr));
|
||||
index++;
|
||||
}
|
||||
@ -137,7 +137,7 @@ static int NetworkFindBroadcastIPsInternal(NetworkAddress *broadcast, int limit)
|
||||
sockaddr_storage address;
|
||||
memset(&address, 0, sizeof(address));
|
||||
/* iiBroadcast is unusable, because it always seems to be set to 255.255.255.255. */
|
||||
((sockaddr_in*)&storage)->sin_addr.s_addr = ifo[j].iiAddress.AddressIn.sin_addr.s_addr | ~ifo[j].iiNetmask.AddressIn.sin_addr.s_addr;
|
||||
((sockaddr_in*)&address)->sin_addr.s_addr = ifo[j].iiAddress.AddressIn.sin_addr.s_addr | ~ifo[j].iiNetmask.AddressIn.sin_addr.s_addr;
|
||||
broadcast[index] = NetworkAddress(address, sizeof(sockaddr));
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#ifndef NETWORK_CORE_HOST_H
|
||||
#define NETWORK_CORE_HOST_H
|
||||
|
||||
void NetworkFindBroadcastIPs(NetworkAddress *broadcast, int limit);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user