DEV9: Fix Auto Adapter in Socket backend on Mac and FreeBSD

This commit is contained in:
TheLastRar 2022-05-01 15:12:44 +01:00 committed by lightningterror
parent c06ac00677
commit 7d81c979fe
1 changed files with 7 additions and 0 deletions

View File

@ -493,6 +493,13 @@ bool SocketAdapter::GetIfAutoAdapter(ifaddrs* adapter, ifaddrs** buffer)
if (gateways.size() > 0)
hasGateway = true;
#elif defined(__FreeBSD__) || (__APPLE__)
std::vector<IP_Address> gateways = InternalServers::DHCP_Server::GetGatewaysBSD(pAdapter->ifa_name);
if (gateways.size() > 0)
hasGateway = true;
#else
Console.Error("DHCP: Unsupported OS, can't find Gateway");
#endif