Skip to content

Commit 8e3fde7

Browse files
authored
bpo-46968: Check for 'sys/auxv.h' in the configure script (pythonGH-31961)
1 parent d190a93 commit 8e3fde7

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
@@ -26,9 +26,9 @@
2626
# define FAULTHANDLER_USE_ALT_STACK
2727
#endif
2828

29-
#if defined(FAULTHANDLER_USE_ALT_STACK) && defined(HAVE_LINUX_AUXVEC_H)
30-
# include <linux/auxvec.h>
31-
# include <sys/auxv.h>
29+
#if defined(FAULTHANDLER_USE_ALT_STACK) && defined(HAVE_LINUX_AUXVEC_H) && defined(HAVE_SYS_AUXV_H)
30+
# include <linux/auxvec.h> // AT_MINSIGSTKSZ
31+
# include <sys/auxv.h> // getauxval()
3232
#endif
3333

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

configure

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2375,7 +2375,7 @@ AC_DEFINE(STDC_HEADERS, 1, [Define to 1 if you have the ANSI C header files.])
23752375
# checks for header files
23762376
AC_CHECK_HEADERS([ \
23772377
alloca.h asm/types.h bluetooth.h conio.h crypt.h direct.h dlfcn.h endian.h errno.h fcntl.h grp.h \
2378-
ieeefp.h io.h langinfo.h libintl.h libutil.h linux/auxvec.h linux/memfd.h linux/random.h linux/soundcard.h \
2378+
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 \
23792379
linux/tipc.h linux/wait.h netinet/in.h netpacket/packet.h poll.h process.h pthread.h pty.h \
23802380
sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \
23812381
sys/endian.h sys/epoll.h sys/event.h sys/eventfd.h sys/file.h sys/ioctl.h sys/kern_control.h \

pyconfig.h.in

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

1191+
/* Define to 1 if you have the <sys/auxv.h> header file. */
1192+
#undef HAVE_SYS_AUXV_H
1193+
11911194
/* Define to 1 if you have the <sys/bsdtty.h> header file. */
11921195
#undef HAVE_SYS_BSDTTY_H
11931196

0 commit comments

Comments
 (0)