From: Thomas Weißschuh Date: Wed, 29 Apr 2026 11:51:57 +0000 (+0200) Subject: meson: gate switch_root on sys/statfs.h X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7765c566b86f61a748ff34ae1ebde519a8e2bfba;p=thirdparty%2Futil-linux.git meson: gate switch_root on sys/statfs.h The target needs this header, encode this in the build system. Signed-off-by: Thomas Weißschuh --- diff --git a/meson.build b/meson.build index d8d82183a..41217c8d4 100644 --- a/meson.build +++ b/meson.build @@ -2139,10 +2139,10 @@ if opt and not is_disabler(exe) bashcompletions += ['pivot_root'] endif -opt = get_option('build-switch_root').allowed() -if opt and not have_dirfd and not have_ddfd - error('neither dirfd nor ddfd are available') -endif +opt = get_option('build-switch_root') \ + .require(have_dirfd or have_ddfd) \ + .require(conf.get('HAVE_SYS_STATFS_H').to_string() == '1') \ + .allowed() exe = executable( 'switch_root', switch_root_sources,