Skip to content

Commit 6fd9737

Browse files
authored
[3.10] bpo-46968: Check for 'sys/auxv.h' in the configure script (GH-31961). (GH-31974)
(cherry picked from commit 8e3fde7) Co-authored-by: Pablo Galindo Salgado <[email protected]>
1 parent d27af88 commit 6fd9737

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Check for the existence of the "sys/auxv.h" header in :mod:`faulthandler` to
2+
avoid compilation problems in systems where this header doesn't exist. Patch
3+
by Pablo Galindo

Modules/faulthandler.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
# define FAULTHANDLER_USE_ALT_STACK
2424
#endif
2525

26-
#if defined(FAULTHANDLER_USE_ALT_STACK) && defined(HAVE_LINUX_AUXVEC_H)
27-
# include <linux/auxvec.h>
28-
# include <sys/auxv.h>
26+
#if defined(FAULTHANDLER_USE_ALT_STACK) && defined(HAVE_LINUX_AUXVEC_H) && defined(HAVE_SYS_AUXV_H)
27+
# include <linux/auxvec.h> // AT_MINSIGSTKSZ
28+
# include <sys/auxv.h> // getauxval()
2929
#endif
3030

3131
/* Allocate at maximum 100 MiB of the stack to raise the stack overflow */

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8101,7 +8101,7 @@ sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
81018101
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
81028102
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
81038103
linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
8104-
sys/endian.h sys/sysmacros.h linux/auxvec.h linux/memfd.h linux/wait.h sys/memfd.h \
8104+
sys/endian.h sys/sysmacros.h linux/auxvec.h sys/auxv.h linux/memfd.h linux/wait.h sys/memfd.h \
81058105
sys/mman.h sys/eventfd.h
81068106
do :
81078107
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
22252225
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
22262226
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
22272227
linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
2228-
sys/endian.h sys/sysmacros.h linux/auxvec.h linux/memfd.h linux/wait.h sys/memfd.h \
2228+
sys/endian.h sys/sysmacros.h linux/auxvec.h sys/auxv.h linux/memfd.h linux/wait.h sys/memfd.h \
22292229
sys/mman.h sys/eventfd.h)
22302230
AC_HEADER_DIRENT
22312231
AC_HEADER_MAJOR

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,9 @@
11281128
/* Define to 1 if you have the <sys/audioio.h> header file. */
11291129
#undef HAVE_SYS_AUDIOIO_H
11301130

1131+
/* Define to 1 if you have the <sys/auxv.h> header file. */
1132+
#undef HAVE_SYS_AUXV_H
1133+
11311134
/* Define to 1 if you have the <sys/bsdtty.h> header file. */
11321135
#undef HAVE_SYS_BSDTTY_H
11331136

0 commit comments

Comments
 (0)