From 2127d53f2f90443f3e4919c1082350ee2b3096f1 Mon Sep 17 00:00:00 2001 From: Nikolay Shirokovskiy Date: Tue, 19 Jan 2021 16:34:26 +0300 Subject: [PATCH] meson: build vstorage only on linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should fix CI error: ../dist-unpack/libvirt-7.1.0/src/storage/storage_backend_vstorage.c:10:10: fatal error: 'mntent.h' file not found #include ^~~~~~~~~~ on freebsd and mac. Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Daniel P. Berrangé --- meson.build | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index e3e7ff758f..d8a63baac9 100644 --- a/meson.build +++ b/meson.build @@ -1957,8 +1957,19 @@ if conf.has('WITH_LIBVIRTD') endif if not get_option('storage_vstorage').disabled() - use_storage = true - conf.set('WITH_STORAGE_VSTORAGE', 1) + vstorage_enable = true + if host_machine.system() != 'linux' + if get_option('storage_fs').enabled() + error('Vstorage is supported only on Linux') + else + vstorage_enable = false + endif + endif + + if vstorage_enable + use_storage = true + conf.set('WITH_STORAGE_VSTORAGE', 1) + endif endif if not get_option('storage_zfs').disabled()