On Mon, Jul 10, 2023 at 07:56:07PM +0200, Philippe Mathieu-Daudé wrote:
> 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>
>            ^~~~~~~~~~~~~~~~

I think that's historical accident, as AFAICT, nothing in stress.c
needs that include to be present.

>   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
> 
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to