diff --git a/src/network_interface.cpp b/src/network_interface.cpp index 6b061b6a..c1ac25b6 100644 --- a/src/network_interface.cpp +++ b/src/network_interface.cpp @@ -331,7 +331,7 @@ NetworkInterface::Info NetworkInterface::info() const { } #else // _WIN32 - #ifndef ANDROID + #if !defined(ANDROID) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 24) struct ifaddrs* ifaddrs = 0; struct ifaddrs* if_it = 0; getifaddrs(&ifaddrs); diff --git a/src/utils/routing_utils.cpp b/src/utils/routing_utils.cpp index 889d2647..55234bad 100644 --- a/src/utils/routing_utils.cpp +++ b/src/utils/routing_utils.cpp @@ -413,7 +413,7 @@ set network_interfaces() { } #else set network_interfaces() { - #ifndef ANDROID + #if !defined(ANDROID) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 24) set output; struct ifaddrs* ifaddrs = 0; struct ifaddrs* if_it = 0;