]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
linux: Use compile_c_snippet to check linux/mount.h availability
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 10 Aug 2022 17:24:46 +0000 (14:24 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 12 Aug 2022 12:15:23 +0000 (09:15 -0300)
Checked on x86_64-linux-gnu.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
sysdeps/unix/sysv/linux/tst-mount-consts.py

index 4fb356310bdbf0886966cb9600ddeb6abaafa927..c6307cb5c23b7369a99baa95a747d53cee84aba3 100755 (executable)
@@ -33,6 +33,11 @@ def main():
                         help='C compiler (including options) to use')
     args = parser.parse_args()
 
+    if glibcextract.compile_c_snippet(
+            '#include <linux/mount.h>',
+            args.cc).returncode != 0:
+        sys.exit (77)
+
     linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
     # Constants in glibc were updated to match Linux v5.19.  When glibc
     # constants are updated this value should be updated to match the