macro: ensure necessary io_uring flags are defined

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2021-11-09 14:01:35 +01:00
parent d6bd3ab9ee
commit 54e21c7e90
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D
2 changed files with 29 additions and 0 deletions

View File

@ -21,6 +21,10 @@
#include "compiler.h" #include "compiler.h"
#if HAVE_LIBURING
#include <liburing.h>
#endif
#ifndef PATH_MAX #ifndef PATH_MAX
#define PATH_MAX 4096 #define PATH_MAX 4096
#endif #endif
@ -36,6 +40,27 @@
#define __S_ISTYPE(mode, mask) (((mode)&S_IFMT) == (mask)) #define __S_ISTYPE(mode, mask) (((mode)&S_IFMT) == (mask))
#endif #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 */ /* capabilities */
#ifndef CAP_CHOWN #ifndef CAP_CHOWN
#define CAP_CHOWN 0 #define CAP_CHOWN 0

View File

@ -15,6 +15,10 @@
#include "macro.h" #include "macro.h"
#include "mainloop.h" #include "mainloop.h"
#if HAVE_LIBURING
#include <liburing.h>
#endif
lxc_log_define(mainloop, lxc); lxc_log_define(mainloop, lxc);
#define CANCEL_RECEIVED (1 << 0) #define CANCEL_RECEIVED (1 << 0)