Skip to content

Commit

Permalink
android: fix build error when no ifaddrs.h (libuv#3505)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive authored and JeffroMF committed May 16, 2022
1 parent b150b24 commit 2a7e44b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/unix/linux-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 2a7e44b

Please sign in to comment.