]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: only build test_enosys when HAVE_FALLOCATE
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Apr 2026 12:19:52 +0000 (14:19 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 4 May 2026 13:52:03 +0000 (15:52 +0200)
The test program calls fallocate(), so don't try to build it when that
is not available.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
meson.build

index 793da8563af4edb6b9b41a03403f06c0d5e8d4b1..48e959dfa87a9b1147adef4c1edde512c7cd871f 100644 (file)
@@ -3991,11 +3991,12 @@ if LINUX and lib_rt.found()
   exes += exe
 endif
 
+opt = conf.get('HAVE_FALLOCATE').to_string() == '1'
 exe = executable(
   'test_enosys',
   'tests/helpers/test_enosys.c',
   include_directories : includes,
-  build_by_default: program_tests)
+  build_by_default: opt and program_tests)
 exes += exe
 
 exe = executable(