public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] linux: Use compile_c_snippet to check linux/pidfd.h availability
@ 2022-08-12 12:52 Adhemerval Zanella
0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2022-08-12 12:52 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1542019b69b7ec7b2cd34357af035e406d153631
commit 1542019b69b7ec7b2cd34357af035e406d153631
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Wed Aug 10 14:24:44 2022 -0300
linux: Use compile_c_snippet to check linux/pidfd.h availability
Instead of tying to a specific kernel version.
Checked on x86_64-linux-gnu.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diff:
---
sysdeps/unix/sysv/linux/tst-pidfd-consts.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
index e207b55eef..d732173abd 100644
--- a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
+++ b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
@@ -33,10 +33,12 @@ 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_headers = glibcsyscalls.linux_kernel_version(args.cc)
linux_version_glibc = (5, 19)
sys.exit(glibcextract.compare_macro_consts(
'#include <sys/pidfd.h>\n',
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-12 12:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-12 12:52 [glibc] linux: Use compile_c_snippet to check linux/pidfd.h availability 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).