diff --git a/test/exec/test_io_uring_context.cpp b/test/exec/test_io_uring_context.cpp index 0516940e4..f294e6529 100644 --- a/test/exec/test_io_uring_context.cpp +++ b/test/exec/test_io_uring_context.cpp @@ -15,7 +15,12 @@ * limitations under the License. */ -#if __has_include() +#include + +// Some kernel versions have but don't support or don't +// allow user access to some of the necessary system calls. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) && __has_include() + #include "exec/linux/io_uring_context.hpp" #include "exec/scope.hpp" #include "exec/single_thread_context.hpp"