public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [COMMITTED 2.36 1/5] linux: Use compile_c_snippet to check linux/pidfd.h availability
@ 2022-08-24 13:07 Adhemerval Zanella
  2022-08-24 13:07 ` [COMMITTED 2.36 2/5] linux: Mimic kernel defition for BLOCK_SIZE Adhemerval Zanella
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Adhemerval Zanella @ 2022-08-24 13:07 UTC (permalink / raw)
  To: libc-alpha; +Cc: Florian Weimer

Instead of tying to a specific kernel version.

Checked on x86_64-linux-gnu.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
(cherry picked from commit 1542019b69b7ec7b2cd34357af035e406d153631)
---
 sysdeps/unix/sysv/linux/tst-pidfd-consts.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
index 90cbb9be64..d732173abd 100644
--- a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
+++ b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
@@ -33,11 +33,13 @@ def main():
                         help='C compiler (including options) to use')
     args = parser.parse_args()
 
-    linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
-    # Linux started to provide pidfd.h with 5.10.
-    if linux_version_headers < (5, 10):
+    if glibcextract.compile_c_snippet(
+            '#include <linux/pidfd.h>',
+            args.cc).returncode != 0:
         sys.exit (77)
-    linux_version_glibc = (5, 18)
+
+    linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
+    linux_version_glibc = (5, 19)
     sys.exit(glibcextract.compare_macro_consts(
                 '#include <sys/pidfd.h>\n',
                 '#include <asm/fcntl.h>\n'
-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-24 13:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 13:07 [COMMITTED 2.36 1/5] linux: Use compile_c_snippet to check linux/pidfd.h availability Adhemerval Zanella
2022-08-24 13:07 ` [COMMITTED 2.36 2/5] linux: Mimic kernel defition for BLOCK_SIZE Adhemerval Zanella
2022-08-24 13:07 ` [COMMITTED 2.36 3/5] linux: Use compile_c_snippet to check linux/mount.h availability Adhemerval Zanella
2022-08-24 13:07 ` [COMMITTED 2.36 4/5] linux: Fix sys/mount.h usage with kernel headers Adhemerval Zanella
2022-08-24 13:07 ` [COMMITTED 2.36 5/5] Linux: Fix enum fsconfig_command detection in <sys/mount.h> Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).