From 5cd95fa949492c4da0bf2de93ac902f1838aa340 Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Wed, 3 Aug 2022 19:38:11 +0200 Subject: [PATCH] internal_network: Fix mingw compilation Apparently, "interface" is a reserved keyword on this compiler. --- src/core/internal_network/network.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cpp index 3b6906f7d4..cdf38a2a40 100644 --- a/src/core/internal_network/network.cpp +++ b/src/core/internal_network/network.cpp @@ -346,15 +346,16 @@ NetworkInstance::~NetworkInstance() { } std::optional GetHostIPv4Address() { - const auto interface = Network::GetSelectedNetworkInterface(); - if (!interface.has_value()) { + const auto network_interface = Network::GetSelectedNetworkInterface(); + if (!network_interface.has_value()) { LOG_ERROR(Network, "GetSelectedNetworkInterface returned no interface"); return {}; } std::array ip_addr = {}; - ASSERT(inet_ntop(AF_INET, &interface->ip_address, ip_addr.data(), sizeof(ip_addr)) != nullptr); - return TranslateIPv4(interface->ip_address); + ASSERT(inet_ntop(AF_INET, &network_interface->ip_address, ip_addr.data(), sizeof(ip_addr)) != + nullptr); + return TranslateIPv4(network_interface->ip_address); } std::pair Poll(std::vector& pollfds, s32 timeout) {