[Python-checkins] cpython (3.6): Issue #28538: On Darwin net/if.h requires that sys/socket.h be included
xavier.degaye
python-checkins at python.org
Wed Dec 21 11:31:34 EST 2016
https://hg.python.org/cpython/rev/f34dac552ad8
changeset: 105772:f34dac552ad8
branch: 3.6
parent: 105769:e248bfb0f520
user: Xavier de Gaye <xdegaye at users.sourceforge.net>
date: Wed Dec 21 17:29:59 2016 +0100
summary:
Issue #28538: On Darwin net/if.h requires that sys/socket.h be included beforehand.
files:
configure | 16 ++++++++++++++--
configure.ac | 16 ++++++++++++++--
2 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -12645,13 +12645,25 @@
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
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -3736,10 +3736,22 @@
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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list