summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorLeonardo Bras2022-05-13 08:28:30 +0200
committerDr. David Alan Gilbert2022-05-16 14:49:36 +0200
commit354081d43de44ebd3497fe08f7f0121a5517d528 (patch)
tree0c361e97cef76d9906145ba35bdf7eb888325b6a /meson.build
parenttests: ensure migration status isn't reported as failed (diff)
downloadqemu-354081d43de44ebd3497fe08f7f0121a5517d528.tar.gz
qemu-354081d43de44ebd3497fe08f7f0121a5517d528.tar.xz
qemu-354081d43de44ebd3497fe08f7f0121a5517d528.zip
meson.build: Fix docker-test-build@alpine when including linux/errqueue.h
A build error happens in alpine CI when linux/errqueue.h is included in io/channel-socket.c, due to redefining of 'struct __kernel_timespec': === ninja: job failed: [...] In file included from /usr/include/linux/errqueue.h:6, from ../io/channel-socket.c:29: /usr/include/linux/time_types.h:7:8: error: redefinition of 'struct __kernel_timespec' 7 | struct __kernel_timespec { | ^~~~~~~~~~~~~~~~~ In file included from /usr/include/liburing.h:19, from /builds/user/qemu/include/block/aio.h:18, from /builds/user/qemu/include/io/channel.h:26, from /builds/user/qemu/include/io/channel-socket.h:24, from ../io/channel-socket.c:24: /usr/include/liburing/compat.h:9:8: note: originally defined here 9 | struct __kernel_timespec { | ^~~~~~~~~~~~~~~~~ ninja: subcommand failed === As above error message suggests, 'struct __kernel_timespec' was already defined by liburing/compat.h. Fix alpine CI by adding test to disable liburing in configure step if a redefinition happens between linux/errqueue.h and liburing/compat.h. [dgilbert: This has been fixed in Alpine issue 13813 and liburing] Signed-off-by: Leonardo Bras <leobras@redhat.com> Message-Id: <20220513062836.965425-2-leobras@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 93aa31a9e4..53a4728250 100644
--- a/meson.build
+++ b/meson.build
@@ -515,12 +515,23 @@ if not get_option('linux_aio').auto() or have_block
required: get_option('linux_aio'),
kwargs: static_kwargs)
endif
+
+linux_io_uring_test = '''
+ #include <liburing.h>
+ #include <linux/errqueue.h>
+
+ int main(void) { return 0; }'''
+
linux_io_uring = not_found
if not get_option('linux_io_uring').auto() or have_block
linux_io_uring = dependency('liburing', version: '>=0.3',
required: get_option('linux_io_uring'),
method: 'pkg-config', kwargs: static_kwargs)
+ if not cc.links(linux_io_uring_test)
+ linux_io_uring = not_found
+ endif
endif
+
libnfs = not_found
if not get_option('libnfs').auto() or have_block
libnfs = dependency('libnfs', version: '>=1.9.3',