]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #28538: On Darwin net/if.h requires that sys/socket.h be included beforehand.
authorXavier de Gaye <xdegaye@users.sourceforge.net>
Wed, 21 Dec 2016 16:29:59 +0000 (17:29 +0100)
committerXavier de Gaye <xdegaye@users.sourceforge.net>
Wed, 21 Dec 2016 16:29:59 +0000 (17:29 +0100)
configure
configure.ac

index a997376b6be284db379b6de80b230a788e460562..a05009a1da964a42bc87473f9da321b4678b767a 100755 (executable)
--- a/configure
+++ b/configure
 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 <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
 #ifdef HAVE_NET_IF_H
 # include <net/if.h>
 #endif
index 61fad0098cc97d0ec60d4a52eab2a24e97de70aa..8099e27c776841e6699c9749a49cbab5f7aeba00 100644 (file)
@@ -3736,10 +3736,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 <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
 #ifdef HAVE_NET_IF_H
 # include <net/if.h>
 #endif