Skip to content

Commit a12ef81

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

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
@@ -21,9 +21,9 @@
2121
# define FAULTHANDLER_USE_ALT_STACK
2222
#endif
2323

24-
#if defined(FAULTHANDLER_USE_ALT_STACK) && defined(HAVE_LINUX_AUXVEC_H)
25-
# include <linux/auxvec.h>
26-
# include <sys/auxv.h>
24+
#if defined(FAULTHANDLER_USE_ALT_STACK) && defined(HAVE_LINUX_AUXVEC_H) && defined(HAVE_SYS_AUXV_H)
25+
# include <linux/auxvec.h> // AT_MINSIGSTKSZ
26+
# include <sys/auxv.h> // getauxval()
2727
#endif
2828

2929
/* 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
@@ -8042,7 +8042,7 @@ sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
80428042
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
80438043
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
80448044
linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
8045-
sys/endian.h sys/sysmacros.h linux/auxvec.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
8045+
sys/endian.h sys/sysmacros.h linux/auxvec.h sys/auxv.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
80468046
do :
80478047
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
80488048
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"

configure.ac

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

pyconfig.h.in

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

1116+
/* Define to 1 if you have the <sys/auxv.h> header file. */
1117+
#undef HAVE_SYS_AUXV_H
1118+
11161119
/* Define to 1 if you have the <sys/bsdtty.h> header file. */
11171120
#undef HAVE_SYS_BSDTTY_H
11181121

0 commit comments

Comments
 (0)