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;