mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +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
				
			
		| 
						 | 
					@ -429,6 +429,8 @@ Tests
 | 
				
			||||||
Build
 | 
					Build
 | 
				
			||||||
-----
 | 
					-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Cross compiling needs host and build settings. configure no longer
 | 
					- Cross compiling needs host and build settings. configure no longer
 | 
				
			||||||
  creates a broken PYTHON_FOR_BUILD variable when --build is missing.
 | 
					  creates a broken PYTHON_FOR_BUILD variable when --build is missing.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										23
									
								
								configure
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								configure
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -9795,28 +9795,20 @@ $as_echo "yes" >&6; }
 | 
				
			||||||
  esac
 | 
					  esac
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if test "$cross_compiling" = yes; then :
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 | 
					 | 
				
			||||||
$as_echo "no" >&6; }
 | 
					 | 
				
			||||||
  ipv6=no
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 | 
					  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 | 
				
			||||||
/* end confdefs.h.  */
 | 
					/* end confdefs.h.  */
 | 
				
			||||||
 /* AF_INET6 available check */
 | 
					 /* AF_INET6 available check */
 | 
				
			||||||
#include <sys/types.h>
 | 
					#include <sys/types.h>
 | 
				
			||||||
#include <sys/socket.h>
 | 
					#include <sys/socket.h>
 | 
				
			||||||
 | 
					int
 | 
				
			||||||
main ()
 | 
					main ()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
 | 
					int domain = AF_INET6;
 | 
				
			||||||
   exit(1);
 | 
					  ;
 | 
				
			||||||
 else
 | 
					  return 0;
 | 
				
			||||||
   exit(0);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
_ACEOF
 | 
					_ACEOF
 | 
				
			||||||
if ac_fn_c_try_run "$LINENO"; then :
 | 
					if ac_fn_c_try_compile "$LINENO"; then :
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 | 
					  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 | 
				
			||||||
$as_echo "yes" >&6; }
 | 
					$as_echo "yes" >&6; }
 | 
				
			||||||
| 
						 | 
					@ -9829,10 +9821,7 @@ $as_echo "no" >&6; }
 | 
				
			||||||
  ipv6=no
 | 
					  ipv6=no
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 | 
					rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 | 
				
			||||||
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test "$ipv6" = "yes"; then
 | 
					if test "$ipv6" = "yes"; then
 | 
				
			||||||
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
 | 
						{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										16
									
								
								configure.ac
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								configure.ac
									
										
									
									
									
								
							| 
						 | 
					@ -2501,25 +2501,15 @@ AC_ARG_ENABLE(ipv6,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[
 | 
					[
 | 
				
			||||||
dnl the check does not work on cross compilation case...
 | 
					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/types.h>
 | 
				
			||||||
#include <sys/socket.h>
 | 
					#include <sys/socket.h>]],
 | 
				
			||||||
main()
 | 
					[[int domain = AF_INET6;]])],[
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
 | 
					 | 
				
			||||||
   exit(1);
 | 
					 | 
				
			||||||
 else
 | 
					 | 
				
			||||||
   exit(0);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
]])],[
 | 
					 | 
				
			||||||
  AC_MSG_RESULT(yes)
 | 
					  AC_MSG_RESULT(yes)
 | 
				
			||||||
  ipv6=yes
 | 
					  ipv6=yes
 | 
				
			||||||
],[
 | 
					],[
 | 
				
			||||||
  AC_MSG_RESULT(no)
 | 
					  AC_MSG_RESULT(no)
 | 
				
			||||||
  ipv6=no
 | 
					  ipv6=no
 | 
				
			||||||
],[
 | 
					 | 
				
			||||||
  AC_MSG_RESULT(no)
 | 
					 | 
				
			||||||
  ipv6=no
 | 
					 | 
				
			||||||
])
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test "$ipv6" = "yes"; then
 | 
					if test "$ipv6" = "yes"; then
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue