diff --git a/configure b/configure index 312ff8ace08..c7207e7e2fa 100755 --- a/configure +++ b/configure @@ -12649,13 +12649,25 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -# On Android API level 24 if_nameindex() is available, but the if_nameindex -# structure is not defined. +# On Android API level 24 with android-ndk-r13, if_nameindex() is available, +# but the if_nameindex structure is not defined. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5 $as_echo_n "checking for if_nameindex... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #ifdef HAVE_NET_IF_H # include #endif diff --git a/configure.ac b/configure.ac index cb43b28b76e..1a08af3b689 100644 --- a/configure.ac +++ b/configure.ac @@ -3738,10 +3738,22 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ AC_MSG_RESULT(no) ]) -# On Android API level 24 if_nameindex() is available, but the if_nameindex -# structure is not defined. +# On Android API level 24 with android-ndk-r13, if_nameindex() is available, +# but the if_nameindex structure is not defined. AC_MSG_CHECKING(for if_nameindex) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #ifdef HAVE_NET_IF_H # include #endif