From: Christian Brauner Date: Tue, 9 Nov 2021 13:01:35 +0000 (+0100) Subject: macro: ensure necessary io_uring flags are defined X-Git-Tag: lxc-5.0.0~52^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4033%2Fhead;p=thirdparty%2Flxc.git macro: ensure necessary io_uring flags are defined Signed-off-by: Christian Brauner --- diff --git a/src/lxc/macro.h b/src/lxc/macro.h index be9ef70c4..464dd5013 100644 --- a/src/lxc/macro.h +++ b/src/lxc/macro.h @@ -21,6 +21,10 @@ #include "compiler.h" +#if HAVE_LIBURING +#include +#endif + #ifndef PATH_MAX #define PATH_MAX 4096 #endif @@ -36,6 +40,27 @@ #define __S_ISTYPE(mode, mask) (((mode)&S_IFMT) == (mask)) #endif +/* + * POLL_ADD flags. Note that since sqe->poll_events is the flag space, the + * command flags for POLL_ADD are stored in sqe->len. + * + * IORING_POLL_ADD_MULTI Multishot poll. Sets IORING_CQE_F_MORE if + * the poll handler will continue to report + * CQEs on behalf of the same SQE. + */ +#ifndef IORING_POLL_ADD_MULTI +#define IORING_POLL_ADD_MULTI (1U << 0) +#endif + +/* + * cqe->flags + * + * IORING_CQE_F_MORE If set, parent SQE will generate more CQE entries + */ +#ifndef IORING_CQE_F_MORE +#define IORING_CQE_F_MORE (1U << 1) +#endif + /* capabilities */ #ifndef CAP_CHOWN #define CAP_CHOWN 0 diff --git a/src/lxc/mainloop.c b/src/lxc/mainloop.c index 3ff955962..a98e21a21 100644 --- a/src/lxc/mainloop.c +++ b/src/lxc/mainloop.c @@ -15,6 +15,10 @@ #include "macro.h" #include "mainloop.h" +#if HAVE_LIBURING +#include +#endif + lxc_log_define(mainloop, lxc); #define CANCEL_RECEIVED (1 << 0)