Trying to build initrd-stress.img on Darwin we get:
$ ninja tests/migration/initrd-stress.img
Compiling C object tests/migration/stress.p/stress.c.o
FAILED: tests/migration/stress.p/stress.c.o
../tests/migration/stress.c:24:10: fatal error: 'linux/random.h' file not
found
#include <linux/random.h>
^~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
Per the include path, this test is Linux specific.
Since this is the single binary built in this directory,
restrict the whole meson.build to Linux.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
tests/migration/meson.build | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/migration/meson.build b/tests/migration/meson.build
index ac71f13290..56523e0785 100644
--- a/tests/migration/meson.build
+++ b/tests/migration/meson.build
@@ -1,3 +1,7 @@
+if targetos != 'linux'
+ subdir_done()
+endif
+
sysprof = dependency('sysprof-capture-4', required: false)
glib_static = dependency('glib-2.0', version: glib_req_ver, required: false,
method: 'pkg-config', static: true)
--
2.38.1