mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-27 14:16:04 +02:00
fs
This commit is contained in:
parent
7ab0adbce8
commit
521b3e5729
1 changed files with 3 additions and 3 deletions
|
|
@ -111,7 +111,7 @@ std::vector<Network::NetworkInterface> GetAvailableNetworkInterfaces() {
|
||||||
#else
|
#else
|
||||||
|
|
||||||
std::vector<Network::NetworkInterface> GetAvailableNetworkInterfaces() {
|
std::vector<Network::NetworkInterface> GetAvailableNetworkInterfaces() {
|
||||||
#if defined(__ANDROID__) || defined(__linux__) || defined(__APPLE__)
|
#if defined(__ANDROID__) || defined(__linux__)
|
||||||
struct ifaddrs* ifaddr = nullptr;
|
struct ifaddrs* ifaddr = nullptr;
|
||||||
if (getifaddrs(&ifaddr) != 0) {
|
if (getifaddrs(&ifaddr) != 0) {
|
||||||
LOG_ERROR(Network, "getifaddrs: {}", std::strerror(errno));
|
LOG_ERROR(Network, "getifaddrs: {}", std::strerror(errno));
|
||||||
|
|
@ -126,7 +126,7 @@ std::vector<Network::NetworkInterface> GetAvailableNetworkInterfaces() {
|
||||||
u32 flags;
|
u32 flags;
|
||||||
};
|
};
|
||||||
std::vector<RoutingEntry> routes{};
|
std::vector<RoutingEntry> routes{};
|
||||||
#if defined(__ANDROID__) || defined(__APPLE__)
|
#if defined(__ANDROID__
|
||||||
// Even through Linux based, we can't reliably obtain routing information from there :(
|
// Even through Linux based, we can't reliably obtain routing information from there :(
|
||||||
// macOS not Linux based and would murder us if we attempt to access /proc
|
// macOS not Linux based and would murder us if we attempt to access /proc
|
||||||
#else
|
#else
|
||||||
|
|
@ -166,7 +166,7 @@ std::vector<Network::NetworkInterface> GetAvailableNetworkInterfaces() {
|
||||||
}
|
}
|
||||||
freeifaddrs(ifaddr);
|
freeifaddrs(ifaddr);
|
||||||
return ifaces;
|
return ifaces;
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__) || defined(__APPLE__)
|
||||||
std::vector<Network::NetworkInterface> ifaces;
|
std::vector<Network::NetworkInterface> ifaces;
|
||||||
int fd = ::socket(PF_ROUTE, SOCK_RAW, AF_UNSPEC);
|
int fd = ::socket(PF_ROUTE, SOCK_RAW, AF_UNSPEC);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue