From 1929e1f128b859669b3424388e5a436b438d4ad8 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 20 Jun 2021 08:38:44 +0100 Subject: [PATCH] getifaddrs: casts for android --- lib/misc/getifaddrs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/misc/getifaddrs.c b/lib/misc/getifaddrs.c index 15e3eaf25..98e768c78 100644 --- a/lib/misc/getifaddrs.c +++ b/lib/misc/getifaddrs.c @@ -90,7 +90,7 @@ getifaddrs2(struct ifaddrs **ifap, int af, int siocgifconf, int siocgifflags, ret = ENOMEM; goto error_out; } - ifconf.ifc_len = buf_size; + ifconf.ifc_len = (int)buf_size; ifconf.ifc_buf = buf; /* @@ -141,7 +141,7 @@ getifaddrs2(struct ifaddrs **ifap, int af, int siocgifconf, int siocgifflags, (*end)->ifa_next = NULL; (*end)->ifa_name = strdup(ifr->ifr_name); - (*end)->ifa_flags = ifreq.ifr_flags; + (*end)->ifa_flags = (unsigned int)ifreq.ifr_flags; (*end)->ifa_addr = lws_malloc(salen, "getifaddrs"); memcpy((*end)->ifa_addr, sa, salen); (*end)->ifa_netmask = NULL;