mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
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>
This commit is contained in:
@@ -33,10 +33,12 @@ def main():
|
|||||||
help='C compiler (including options) to use')
|
help='C compiler (including options) to use')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
|
if glibcextract.compile_c_snippet(
|
||||||
# Linux started to provide pidfd.h with 5.10.
|
'#include <linux/pidfd.h>',
|
||||||
if linux_version_headers < (5, 10):
|
args.cc).returncode != 0:
|
||||||
sys.exit (77)
|
sys.exit (77)
|
||||||
|
|
||||||
|
linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
|
||||||
linux_version_glibc = (5, 19)
|
linux_version_glibc = (5, 19)
|
||||||
sys.exit(glibcextract.compare_macro_consts(
|
sys.exit(glibcextract.compare_macro_consts(
|
||||||
'#include <sys/pidfd.h>\n',
|
'#include <sys/pidfd.h>\n',
|
||||||
|
Reference in New Issue
Block a user