1 diff -u -r ../inetutils-1.9.3/libinetutils/if_index.c ./libinetutils/if_index.c
2 --- ../inetutils-1.9.3/libinetutils/if_index.c 2015-03-31 11:40:48.000000000 -0400
3 +++ ./libinetutils/if_index.c 2015-05-12 15:32:45.660145151 -0400
7 #ifndef HAVE_STRUCT_IF_NAMEINDEX
10 +struct if_nameindex {
11 + unsigned int if_index;
14 +# define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */
18 if_nametoindex (const char *ifname)
26 int fd = socket (AF_INET, SOCK_DGRAM, 0);
35 if_freenameindex (struct if_nameindex *ifn)
38 struct if_nameindex *ptr = ifn;
53 -# if defined SIOCGIFINDEX
54 +# if defined SIOCGIFINDEX && !defined(__ANDROID__)
55 if (ioctl (fd, SIOCGIFINDEX, cur) >= 0)
56 idx[i].if_index = cur->ifr_index;