From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa2d.google.com (mail-vk1-xa2d.google.com [IPv6:2607:f8b0:4864:20::a2d]) by sourceware.org (Postfix) with ESMTPS id A04C9385C32C for ; Wed, 24 Aug 2022 13:07:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A04C9385C32C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-vk1-xa2d.google.com with SMTP id n28so5090563vkm.5 for ; Wed, 24 Aug 2022 06:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=1QZJMcYb1D7VfJ7IgrguwYhtLXtEeHLK74SPYLVEjUk=; b=ocGNkETGh74XrSeR5fzmbjLUU79YYSmYo1Z2+22LQGFKHaCtZdHh/3n7rKJN9Ag1KX IyR2ODUmhIPQmsQoTe1Zi79TNlSNE9zSiX/BFgfVZuP29p8eKNLPpQdP4NyLsF2ZQMPK bsHaCcbQzlXYUuqpxAMi0ZIAW5sEOeuwZonnRaTbIZZjoLoAqvHXKjzvlmkSL2QIumOm sgj1Hd1QeWHnIB9jwZyrh3Q00iXpvNHkGoPWp/9Py5chnW05LawK9o0iU5tc+MObWnjl 0yUtFUiAUcMaiF5V4g1EnLI1BhmmeuQqeWAiTCBGfXIZrZ0hns5wVDW2mf2zxvZPpfuk mdQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=1QZJMcYb1D7VfJ7IgrguwYhtLXtEeHLK74SPYLVEjUk=; b=M/I8YSHqbVqqlFhmnmh2IMmuxylLR+U8i0sOLx+L7DaBmQ6xQOUDyzJx/urab87QzO lNj+mq06NJQG6Q9PnUCeW3uaDYPguNWwGWI5ac/34RAIuSFyXWKdw/mvYZSH/cUQs++t CkLBcILn2JFcBuYFhaowVFBpQTld+xFui78mqZtNgV+K29FmLa3aUxUtPxo+JHV1MNvj hnpXs+64hDbZYRBWFSHSTBB6jJ/G5EcSuRlSkGUEv4xpKVcUGVeqc3Jmh0PThY9otkDv B7NL5jbWE9ghukFGt9S6DVGSwR8AvLUqLhO0r1nSWNYd23U2AUxbEDuzk2AHIQj+uPuo I5uA== X-Gm-Message-State: ACgBeo0mWJXGWydNLwzs6Gv6ibqIRUqd8buuuv0+IAGDS6YJqBupDPCl an9SnZTzAiquCM/gYCorVLZnbDLBwpXKhQ== X-Google-Smtp-Source: AA6agR4K3p0y+MZxbwTeMQ1M7B7cg5k+tcSZCpyljxUUDkX3P5hc92BFk7Y4T9gprVJbVnH6HIXjHA== X-Received: by 2002:a1f:1644:0:b0:378:c157:d0f5 with SMTP id 65-20020a1f1644000000b00378c157d0f5mr11440999vkw.5.1661346446699; Wed, 24 Aug 2022 06:07:26 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:745e:1e2b:867:85d9:4667]) by smtp.gmail.com with ESMTPSA id k6-20020a9f3f86000000b0038275916987sm13709836uaj.14.2022.08.24.06.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 06:07:26 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Florian Weimer Subject: [COMMITTED 2.36 1/5] linux: Use compile_c_snippet to check linux/pidfd.h availability Date: Wed, 24 Aug 2022 10:07:16 -0300 Message-Id: <20220824130720.2236114-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Instead of tying to a specific kernel version. Checked on x86_64-linux-gnu. Reviewed-by: Florian Weimer (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 ', + 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 \n', '#include \n' -- 2.34.1