diff options
author | Karel Zak <kzak@redhat.com> | 2024-04-15 08:57:13 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2024-04-15 08:57:13 +0200 |
commit | e67ef2f8f77b2513a77a60e78a511c09e5bcaea1 (patch) | |
tree | b7aae4efffd9814f1ae13cec5cd0674bde5f997b | |
parent | 854bcfe1c751e4708ffb45388497437d30d023f1 (diff) | |
parent | b8b63b36ac33f92be17a12370a0640ce5cf06a80 (diff) | |
download | util-linux-e67ef2f8f77b2513a77a60e78a511c09e5bcaea1.tar.gz |
Merge branch 'meson-have-sys-vfs-header' of https://github.com/jwillikers/util-linux
* 'meson-have-sys-vfs-header' of https://github.com/jwillikers/util-linux:
meson: Require the sys/vfs.h header for libmount and fstrim
-rw-r--r-- | meson.build | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 204cdd88a7..05d31cdced 100644 --- a/meson.build +++ b/meson.build @@ -102,7 +102,12 @@ conf.set('HAVE_MOUNTFD_API', have_mountfd_api ? 1 : false) have_struct_statx = cc.sizeof('struct statx', prefix : '#include <sys/stat.h>') > 0 conf.set('HAVE_STRUCT_STATX', have_struct_statx ? 1 : false) -build_libmount = get_option('build-libmount').require(get_option('build-libblkid').allowed()).allowed() +have_sys_vfs_header = cc.has_header('sys/vfs.h') + +build_libmount = get_option('build-libmount').require( + get_option('build-libblkid').allowed() \ + and have_sys_vfs_header \ +).allowed() conf.set('HAVE_LIBMOUNT', build_libmount ? 1 : false) conf.set('USE_LIBMOUNT_SUPPORT_NAMESPACES', 1) @@ -1504,7 +1509,7 @@ if opt and not is_disabler(exe) bashcompletions += ['tunelp'] endif -opt = not get_option('build-fstrim').disabled() +opt = get_option('build-fstrim').require(have_sys_vfs_header).allowed() exe = executable( 'fstrim', fstrim_sources, |