mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(cherry picked from commit 0ab6244f6b
)
This commit is contained in:
parent
0e5dfa42c3
commit
9197926bca
@ -174,7 +174,7 @@ static void NetworkFindBroadcastIPsInternal(NetworkAddressList *broadcast) // !G
|
||||
(r.ifr_flags & IFF_BROADCAST) &&
|
||||
ioctl(sock, SIOCGIFBRDADDR, &r) != -1) {
|
||||
NetworkAddress addr(&r.ifr_broadaddr, sizeof(sockaddr));
|
||||
if (std::none_of(broadcast->begin(), broadcast->end(), [&addr](NetworkAddress const& elem) -> bool { return elem == addr; })) *broadcast->Append() = addr;
|
||||
if (std::none_of(broadcast->begin(), broadcast->end(), [&addr](NetworkAddress const& elem) -> bool { return elem == addr; })) broadcast->push_back(addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user