1 diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt
2 index 760244b9b4..7f83923671 100644
3 --- a/src/os/CMakeLists.txt
4 +++ b/src/os/CMakeLists.txt
5 @@ -134,27 +134,6 @@ if(WITH_EVENTTRACE)
9 - include(ExternalProject)
10 - if("${CMAKE_GENERATOR}" MATCHES "Make")
11 - set(make_cmd "$(MAKE)")
13 - set(make_cmd "make")
15 - ExternalProject_Add(liburing_ext
16 - DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/src/
17 - GIT_REPOSITORY http://git.kernel.dk/liburing
18 - GIT_TAG "4e360f71131918c36774f51688e5c65dea8d43f2"
19 - SOURCE_DIR ${CMAKE_BINARY_DIR}/src/liburing
20 - CONFIGURE_COMMAND <SOURCE_DIR>/configure
21 - BUILD_COMMAND env CC=${CMAKE_C_COMPILER} ${make_cmd} -C src -s
25 - add_library(liburing STATIC IMPORTED GLOBAL)
26 - add_dependencies(liburing liburing_ext)
27 - set_target_properties(liburing PROPERTIES
28 - IMPORTED_LINK_INTERFACE_LANGUAGES "C"
29 - IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/src/liburing/src/liburing.a")
30 - target_link_libraries(os liburing)
31 - target_include_directories(os SYSTEM PRIVATE "${CMAKE_BINARY_DIR}/src/liburing/src/include")
32 + pkg_check_modules(LIBURING REQUIRED IMPORTED_TARGET liburing)
33 + target_link_libraries(os uring)
35 diff --git a/src/os/bluestore/io_uring.cc b/src/os/bluestore/io_uring.cc
36 index 54fa0f9535..4ba83cf172 100644
37 --- a/src/os/bluestore/io_uring.cc
38 +++ b/src/os/bluestore/io_uring.cc
42 #include <sys/epoll.h>
44 +#include <sys/syscall.h>
48 @@ -134,8 +136,7 @@ int ioring_queue_t::init(std::vector<int> &fds)
52 - ret = io_uring_register(d->io_uring.ring_fd, IORING_REGISTER_FILES,
53 - &fds[0], fds.size());
54 + ret = io_uring_register_files(&d->io_uring, &fds[0], fds.size());
58 @@ -214,7 +215,7 @@ bool ioring_queue_t::supported()
59 struct io_uring_params p;
61 memset(&p, 0, sizeof(p));
62 - int fd = io_uring_setup(16, &p);
63 + int fd = syscall(SYS_io_uring_setup, 16, &p);