]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46968: Check for 'sys/auxv.h' in the configure script (GH-31961)
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Fri, 18 Mar 2022 12:03:22 +0000 (12:03 +0000)
committerGitHub <noreply@github.com>
Fri, 18 Mar 2022 12:03:22 +0000 (05:03 -0700)
Misc/NEWS.d/next/Core and Builtins/2022-03-17-14-22-23.bpo-46968.4gz4NA.rst [new file with mode: 0644]
Modules/faulthandler.c
configure
configure.ac
pyconfig.h.in

diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-03-17-14-22-23.bpo-46968.4gz4NA.rst b/Misc/NEWS.d/next/Core and Builtins/2022-03-17-14-22-23.bpo-46968.4gz4NA.rst
new file mode 100644 (file)
index 0000000..bef1d05
--- /dev/null
@@ -0,0 +1,3 @@
+Check for the existence of the "sys/auxv.h" header in :mod:`faulthandler` to
+avoid compilation problems in systems where this header doesn't exist. Patch
+by Pablo Galindo
index 744698cd7aba2521635d6bea9d98db27320f7d0b..91f96665a4a3082a5491db7f39d6bea184ca3f7c 100644 (file)
@@ -26,9 +26,9 @@
 #  define FAULTHANDLER_USE_ALT_STACK
 #endif
 
-#if defined(FAULTHANDLER_USE_ALT_STACK) && defined(HAVE_LINUX_AUXVEC_H)
-#  include <linux/auxvec.h>
-#  include <sys/auxv.h>
+#if defined(FAULTHANDLER_USE_ALT_STACK) && defined(HAVE_LINUX_AUXVEC_H) && defined(HAVE_SYS_AUXV_H)
+#  include <linux/auxvec.h>       // AT_MINSIGSTKSZ
+#  include <sys/auxv.h>           // getauxval()
 #endif
 
 /* Allocate at maximum 100 MiB of the stack to raise the stack overflow */
index 4d585eba626a60c7f84ce7327538c4f1e46a8eb1..5fa6efaab4fb7c16df6d23a12d3acac19e7936e7 100755 (executable)
--- a/configure
+++ b/configure
@@ -8652,7 +8652,7 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
 # checks for header files
 for ac_header in  \
   alloca.h asm/types.h bluetooth.h conio.h crypt.h direct.h dlfcn.h endian.h errno.h fcntl.h grp.h \
-  ieeefp.h io.h langinfo.h libintl.h libutil.h linux/auxvec.h linux/memfd.h linux/random.h linux/soundcard.h \
+  ieeefp.h io.h langinfo.h libintl.h libutil.h linux/auxvec.h sys/auxv.h linux/memfd.h linux/random.h linux/soundcard.h \
   linux/tipc.h linux/wait.h netinet/in.h netpacket/packet.h poll.h process.h pthread.h pty.h \
   sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \
   sys/endian.h sys/epoll.h sys/event.h sys/eventfd.h sys/file.h sys/ioctl.h sys/kern_control.h \
index 81262ae38e5344ef1b9b6d14002343f5bf68892a..7a37ad279d0fcba129da389877afe989bf7e4fa6 100644 (file)
@@ -2375,7 +2375,7 @@ AC_DEFINE(STDC_HEADERS, 1, [Define to 1 if you have the ANSI C header files.])
 # checks for header files
 AC_CHECK_HEADERS([ \
   alloca.h asm/types.h bluetooth.h conio.h crypt.h direct.h dlfcn.h endian.h errno.h fcntl.h grp.h \
-  ieeefp.h io.h langinfo.h libintl.h libutil.h linux/auxvec.h linux/memfd.h linux/random.h linux/soundcard.h \
+  ieeefp.h io.h langinfo.h libintl.h libutil.h linux/auxvec.h sys/auxv.h linux/memfd.h linux/random.h linux/soundcard.h \
   linux/tipc.h linux/wait.h netinet/in.h netpacket/packet.h poll.h process.h pthread.h pty.h \
   sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \
   sys/endian.h sys/epoll.h sys/event.h sys/eventfd.h sys/file.h sys/ioctl.h sys/kern_control.h \
index 1b84ee108fbfc8cfc9717118e5d45590da5b14c8..40952883853e322eb86af986941bafa049881ab2 100644 (file)
 /* Define to 1 if you have the <sys/audioio.h> header file. */
 #undef HAVE_SYS_AUDIOIO_H
 
+/* Define to 1 if you have the <sys/auxv.h> header file. */
+#undef HAVE_SYS_AUXV_H
+
 /* Define to 1 if you have the <sys/bsdtty.h> header file. */
 #undef HAVE_SYS_BSDTTY_H