]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
macro: ensure necessary io_uring flags are defined 4033/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 9 Nov 2021 13:01:35 +0000 (14:01 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 9 Nov 2021 13:11:18 +0000 (14:11 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/macro.h
src/lxc/mainloop.c

index be9ef70c421424653d4b8fb6c749aa97e0603a20..464dd501353e0a81c7eed6179fa0ed819e620288 100644 (file)
 
 #include "compiler.h"
 
+#if HAVE_LIBURING
+#include <liburing.h>
+#endif
+
 #ifndef PATH_MAX
 #define PATH_MAX 4096
 #endif
 #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
index 3ff955962dfbe7a934731253ba8a55648e6215b6..a98e21a21a4340da470fae0c58527e7d37c26730 100644 (file)
 #include "macro.h"
 #include "mainloop.h"
 
+#if HAVE_LIBURING
+#include <liburing.h>
+#endif
+
 lxc_log_define(mainloop, lxc);
 
 #define CANCEL_RECEIVED (1 << 0)