diff options
author | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2016-12-21 11:46:36 (GMT) |
---|---|---|
committer | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2016-12-21 11:46:36 (GMT) |
commit | 708784255e42f0946ab36d2a55e4c4ae99b086ec (patch) | |
tree | dcdba51b0d0525ef6270efce97822fc171e9178b /configure.ac | |
parent | 690e81f63f5cac9ca6fdb0ff90f1c43e98c9e510 (diff) | |
download | cpython-708784255e42f0946ab36d2a55e4c4ae99b086ec.zip cpython-708784255e42f0946ab36d2a55e4c4ae99b086ec.tar.gz cpython-708784255e42f0946ab36d2a55e4c4ae99b086ec.tar.bz2 |
Issue #28538: Fix the compilation error that occurs because if_nameindex() is
available on Android API level 24, but the if_nameindex structure is not defined.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 9013c0e..61fad00 100644 --- a/configure.ac +++ b/configure.ac @@ -3384,7 +3384,6 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ futimens futimes gai_strerror getentropy \ getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \ - if_nameindex \ initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \ memrchr mbrtowc mkdirat mkfifo \ mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \ @@ -3737,6 +3736,19 @@ 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. +AC_MSG_CHECKING(for if_nameindex) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#ifdef HAVE_NET_IF_H +# include <net/if.h> +#endif +]], [[struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;]])], + [AC_DEFINE(HAVE_IF_NAMEINDEX, 1, Define to 1 if you have the 'if_nameindex' function.) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) +]) + # On OSF/1 V5.1, getaddrinfo is available, but a define # for [no]getaddrinfo in netdb.h. AC_MSG_CHECKING(for getaddrinfo) |