android: fix build error when no ifaddrs.h (#3505)

This commit is contained in:
ssrlive 2022-03-03 20:18:28 +08:00 committed by GitHub
parent 83efa3dd71
commit c40f8cb9f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -616,6 +616,7 @@ static uint64_t read_cpufreq(unsigned int cpunum) {
}
#ifdef HAVE_IFADDRS_H
static int uv__ifaddr_exclude(struct ifaddrs *ent, int exclude_type) {
if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)))
return 1;
@ -629,6 +630,7 @@ static int uv__ifaddr_exclude(struct ifaddrs *ent, int exclude_type) {
return exclude_type;
return !exclude_type;
}
#endif
int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
#ifndef HAVE_IFADDRS_H