8000 [3.11] gh-106881: Check for linux/limits.h before including it (#1073… · python/cpython@4049c5d · GitHub
[go: up one dir, main page]

Skip to content

Commit 4049c5d

Browse files
authored
[3.11] gh-106881: Check for linux/limits.h before including it (#107397) (#107415)
* [3.11] gh-106881: Check for linux/limits.h before including it (#107397) * Check for linux/limits.h before including it Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> (cherry picked from commit 11c055f) * Fix sphinx-lint error in NEWS entry
1 parent c343252 commit 4049c5d

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Check for ``linux/limits.h`` before including it in ``Modules/posixmodule.c``.

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ corresponding Unix manual entries for more information on calls.");
280280
# undef HAVE_SCHED_SETAFFINITY
281281
#endif
282282

283-
#if defined(HAVE_SYS_XATTR_H) && defined(__linux__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
283+
#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LINUX_LIMITS_H) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
284284
# define USE_XATTRS
285285
# include <linux/limits.h> // Needed for XATTR_SIZE_MAX on musl libc.
286286
#endif

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
@@ -2668,7 +2668,7 @@ AC_DEFINE(STDC_HEADERS, 1, [Define to 1 if you have the ANSI C header files.])
26682668
# checks for header files
26692669
AC_CHECK_HEADERS([ \
26702670
alloca.h asm/types.h bluetooth.h conio.h crypt.h direct.h dlfcn.h endian.h errno.h fcntl.h grp.h \
2671-
ieeefp.h io.h langinfo.h libintl.h libutil.h linux/auxvec.h sys/auxv.h linux/memfd.h \
2671+
ieeefp.h io.h langinfo.h libintl.h libutil.h linux/auxvec.h sys/auxv.h linux/limits.h linux/memfd.h \
26722672
linux/random.h linux/soundcard.h \
26732673
linux/tipc.h linux/wait.h netdb.h netinet/in.h netpacket/packet.h poll.h process.h pthread.h pty.h \
26742674
sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@
718718
/* Define if compiling using Linux 4.1 or later. */
719719
#undef HAVE_LINUX_CAN_RAW_JOIN_FILTERS
720720

721+
/* Define to 1 if you have the <linux/limits.h> header file. */
722+
#undef HAVE_LINUX_LIMITS_H
723+
721724
/* Define to 1 if you have the <linux/memfd.h> header file. */
722725
#undef HAVE_LINUX_MEMFD_H
723726

0 commit comments

Comments
 (0)
0