2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

internal_network: Fix mingw compilation

Apparently, "interface" is a reserved keyword on this compiler.
This commit is contained in:
FearlessTobi 2022-08-03 19:38:11 +02:00
parent 6d41088153
commit 5cd95fa949

View file

@ -346,15 +346,16 @@ NetworkInstance::~NetworkInstance() {
} }
std::optional<IPv4Address> GetHostIPv4Address() { std::optional<IPv4Address> GetHostIPv4Address() {
const auto interface = Network::GetSelectedNetworkInterface(); const auto network_interface = Network::GetSelectedNetworkInterface();
if (!interface.has_value()) { if (!network_interface.has_value()) {
LOG_ERROR(Network, "GetSelectedNetworkInterface returned no interface"); LOG_ERROR(Network, "GetSelectedNetworkInterface returned no interface");
return {}; return {};
} }
std::array<char, 16> ip_addr = {}; std::array<char, 16> ip_addr = {};
ASSERT(inet_ntop(AF_INET, &interface->ip_address, ip_addr.data(), sizeof(ip_addr)) != nullptr); ASSERT(inet_ntop(AF_INET, &network_interface->ip_address, ip_addr.data(), sizeof(ip_addr)) !=
return TranslateIPv4(interface->ip_address); nullptr);
return TranslateIPv4(network_interface->ip_address);
} }
std::pair<s32, Errno> Poll(std::vector<PollFD>& pollfds, s32 timeout) { std::pair<s32, Errno> Poll(std::vector<PollFD>& pollfds, s32 timeout) {