mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
bump liburing
This commit is contained in:
parent
64accde7bd
commit
a7d1e62054
2
contrib/liburing
vendored
2
contrib/liburing
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 316b6de32a7a6e9f569f6e9b0020b6647a614327
|
Subproject commit f5a48392c4ea33f222cbebeb2e2fc31620162949
|
@ -7,9 +7,9 @@ endif ()
|
|||||||
option (ENABLE_LIBURING "Enable liburing" ${ENABLE_LIBURING_DEFAULT})
|
option (ENABLE_LIBURING "Enable liburing" ${ENABLE_LIBURING_DEFAULT})
|
||||||
|
|
||||||
if (NOT ENABLE_LIBURING)
|
if (NOT ENABLE_LIBURING)
|
||||||
message(STATUS "Not using liburing")
|
message (STATUS "Not using liburing")
|
||||||
return()
|
return ()
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
set (LIBURING_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/liburing/src/include")
|
set (LIBURING_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/liburing/src/include")
|
||||||
set (LIBURING_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/liburing/src")
|
set (LIBURING_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/liburing/src")
|
||||||
@ -18,23 +18,36 @@ set (SRCS
|
|||||||
"${LIBURING_SOURCE_DIR}/queue.c"
|
"${LIBURING_SOURCE_DIR}/queue.c"
|
||||||
"${LIBURING_SOURCE_DIR}/register.c"
|
"${LIBURING_SOURCE_DIR}/register.c"
|
||||||
"${LIBURING_SOURCE_DIR}/setup.c"
|
"${LIBURING_SOURCE_DIR}/setup.c"
|
||||||
|
"${LIBURING_SOURCE_DIR}/syscall.c"
|
||||||
|
"${LIBURING_SOURCE_DIR}/version.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_compile_definitions (_GNU_SOURCE)
|
||||||
|
add_compile_definitions (LIBURING_INTERNAL)
|
||||||
|
|
||||||
set (LIBURING_COMPAT_INCLUDE_DIR "${ClickHouse_BINARY_DIR}/contrib/liburing/src/include-compat")
|
set (LIBURING_COMPAT_INCLUDE_DIR "${ClickHouse_BINARY_DIR}/contrib/liburing/src/include-compat")
|
||||||
set (LIBURING_COMPAT_HEADER "${LIBURING_COMPAT_INCLUDE_DIR}/liburing/compat.h")
|
set (LIBURING_COMPAT_HEADER "${LIBURING_COMPAT_INCLUDE_DIR}/liburing/compat.h")
|
||||||
|
|
||||||
set (LIBURING_CONFIG_HAS_KERNEL_RWF_T, "yes")
|
set (LIBURING_CONFIG_HAS_KERNEL_RWF_T FALSE)
|
||||||
set (LIBURING_CONFIG_HAS_KERNEL_TIMESPEC, "no")
|
set (LIBURING_CONFIG_HAS_KERNEL_TIMESPEC FALSE)
|
||||||
set (LIBURING_CONFIG_HAS_OPEN_HOW, "no")
|
set (LIBURING_CONFIG_HAS_OPEN_HOW FALSE)
|
||||||
set (LIBURING_CONFIG_HAS_STATX, "no")
|
set (LIBURING_CONFIG_HAS_STATX FALSE)
|
||||||
set (LIBURING_CONFIG_HAS_GLIBC_STATX, "no")
|
set (LIBURING_CONFIG_HAS_GLIBC_STATX FALSE)
|
||||||
|
|
||||||
add_compile_definitions(_GNU_SOURCE)
|
|
||||||
add_compile_definitions(LIBURING_INTERNAL)
|
|
||||||
|
|
||||||
configure_file (compat.h.in ${LIBURING_COMPAT_HEADER})
|
configure_file (compat.h.in ${LIBURING_COMPAT_HEADER})
|
||||||
|
|
||||||
|
set (LIBURING_GENERATED_INCLUDE_DIR "${ClickHouse_BINARY_DIR}/contrib/liburing/src/include")
|
||||||
|
set (LIBURING_VERSION_HEADER "${LIBURING_GENERATED_INCLUDE_DIR}/liburing/io_uring_version.h")
|
||||||
|
|
||||||
|
file (READ "${LIBURING_SOURCE_DIR}/../liburing.spec" LIBURING_SPEC)
|
||||||
|
|
||||||
|
string (REGEX MATCH "Version: ([0-9]+)\.([0-9]+)" _ ${LIBURING_SPEC})
|
||||||
|
set (LIBURING_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||||
|
set (LIBURING_VERSION_MINOR ${CMAKE_MATCH_2})
|
||||||
|
|
||||||
|
configure_file (io_uring_version.h.in ${LIBURING_VERSION_HEADER})
|
||||||
|
|
||||||
add_library (_liburing ${SRCS})
|
add_library (_liburing ${SRCS})
|
||||||
add_library (ch_contrib::liburing ALIAS _liburing)
|
add_library (ch_contrib::liburing ALIAS _liburing)
|
||||||
|
|
||||||
target_include_directories (_liburing SYSTEM PUBLIC ${LIBURING_COMPAT_INCLUDE_DIR} "${LIBURING_SOURCE_DIR}/include")
|
target_include_directories (_liburing SYSTEM PUBLIC ${LIBURING_COMPAT_INCLUDE_DIR} ${LIBURING_GENERATED_INCLUDE_DIR} "${LIBURING_SOURCE_DIR}/include")
|
||||||
|
@ -19,8 +19,16 @@ struct __kernel_timespec {
|
|||||||
int64_t tv_sec;
|
int64_t tv_sec;
|
||||||
long long tv_nsec;
|
long long tv_nsec;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* <linux/time_types.h> is not available, so it can't be included */
|
||||||
|
#define UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H 1
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#include <linux/time_types.h>
|
#include <linux/time_types.h>
|
||||||
|
|
||||||
|
/* <linux/time_types.h> is included above and not needed again */
|
||||||
|
#define UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LIBURING_CONFIG_HAS_OPEN_HOW)
|
#if !defined(LIBURING_CONFIG_HAS_OPEN_HOW)
|
||||||
@ -31,6 +39,8 @@ struct open_how {
|
|||||||
uint64_t mode;
|
uint64_t mode;
|
||||||
uint64_t resolve;
|
uint64_t resolve;
|
||||||
};
|
};
|
||||||
|
#else
|
||||||
|
#include <linux/openat2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LIBURING_CONFIG_HAS_GLIBC_STATX) && defined(LIBURING_CONFIG_HAS_STATX)
|
#if !defined(LIBURING_CONFIG_HAS_GLIBC_STATX) && defined(LIBURING_CONFIG_HAS_STATX)
|
||||||
|
8
contrib/liburing-cmake/io_uring_version.h.in
Normal file
8
contrib/liburing-cmake/io_uring_version.h.in
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/* SPDX-License-Identifier: MIT */
|
||||||
|
#ifndef LIBURING_VERSION_H
|
||||||
|
#define LIBURING_VERSION_H
|
||||||
|
|
||||||
|
#define IO_URING_VERSION_MAJOR ${LIBURING_VERSION_MAJOR}
|
||||||
|
#define IO_URING_VERSION_MINOR ${LIBURING_VERSION_MINOR}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user