@@ -11198,7 +11198,6 @@ for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
1119811198 futimens futimes gai_strerror getentropy \
1119911199 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
1120011200 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
11201- if_nameindex \
1120211201 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
1120311202 memrchr mbrtowc mkdirat mkfifo \
1120411203 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
@@ -12642,6 +12641,39 @@ else
1264212641 { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
1264312642$as_echo " no" >&6 ; }
1264412643
12644+ fi
12645+ rm -f core conftest.err conftest.$ac_objext \
12646+ conftest$ac_exeext conftest.$ac_ext
12647+
12648+ # On Android API level 24 if_nameindex() is available, but the if_nameindex
12649+ # structure is not defined.
12650+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for if_nameindex" >&5
12651+ $as_echo_n " checking for if_nameindex... " >&6 ; }
12652+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
12653+ /* end confdefs.h. */
12654+
12655+ #ifdef HAVE_NET_IF_H
12656+ # include <net/if.h>
12657+ #endif
12658+
12659+ int
12660+ main ()
12661+ {
12662+ struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12663+ ;
12664+ return 0;
12665+ }
12666+ _ACEOF
12667+ if ac_fn_c_try_link " $LINENO " ; then :
12668+
12669+ $as_echo " #define HAVE_IF_NAMEINDEX 1" >> confdefs.h
12670+
12671+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: yes" >&5
12672+ $as_echo " yes" >&6 ; }
12673+ else
12674+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
12675+ $as_echo " no" >&6 ; }
12676+
1264512677fi
1264612678rm -f core conftest.err conftest.$ac_objext \
1264712679 conftest$ac_exeext conftest.$ac_ext
0 commit comments