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