about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-08-10 14:24:46 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-08-12 09:15:23 -0300
commite1226cdc6b209539a92d32d5b620ba53fd35abf3 (patch)
treec4e389a7daf4519dd9633dd2c72512d84057fc56 /sysdeps
parentc68b6044bc7945716431f1adc091b17c39b80a06 (diff)
downloadglibc-e1226cdc6b209539a92d32d5b620ba53fd35abf3.tar.gz
glibc-e1226cdc6b209539a92d32d5b620ba53fd35abf3.tar.xz
glibc-e1226cdc6b209539a92d32d5b620ba53fd35abf3.zip
linux: Use compile_c_snippet to check linux/mount.h availability
Checked on x86_64-linux-gnu.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'sysdeps')
-rwxr-xr-xsysdeps/unix/sysv/linux/tst-mount-consts.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-mount-consts.py b/sysdeps/unix/sysv/linux/tst-mount-consts.py
index 4fb356310b..c6307cb5c2 100755
--- a/sysdeps/unix/sysv/linux/tst-mount-consts.py
+++ b/sysdeps/unix/sysv/linux/tst-mount-consts.py
@@ -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