mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
This commit is contained in:
commit
1aa004b45d
3 changed files with 12 additions and 31 deletions
16
configure.ac
16
configure.ac
|
@ -2501,25 +2501,15 @@ AC_ARG_ENABLE(ipv6,
|
|||
|
||||
[
|
||||
dnl the check does not work on cross compilation case...
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 available check */
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* AF_INET6 available check */
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
main()
|
||||
{
|
||||
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
|
||||
exit(1);
|
||||
else
|
||||
exit(0);
|
||||
}
|
||||
]])],[
|
||||
#include <sys/socket.h>]],
|
||||
[[int domain = AF_INET6;]])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
ipv6=yes
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no
|
||||
])
|
||||
|
||||
if test "$ipv6" = "yes"; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue