Skip to content
  • Leonardo Bras's avatar
    354081d4
    meson.build: Fix docker-test-build@alpine when including linux/errqueue.h · 354081d4
    Leonardo Bras authored
    
    
    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: default avatarLeonardo Bras <leobras@redhat.com>
    Message-Id: <20220513062836.965425-2-leobras@redhat.com>
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    354081d4
    meson.build: Fix docker-test-build@alpine when including linux/errqueue.h
    Leonardo Bras authored
    
    
    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: default avatarLeonardo Bras <leobras@redhat.com>
    Message-Id: <20220513062836.965425-2-leobras@redhat.com>
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Loading