Update kernel version macro definitions to add support for kernel version 5.0 and adjust conditional compilation for newer versions

This commit is contained in:
ShirkNeko
2025-04-12 19:02:52 +08:00
parent 51a0357f0f
commit 2cbe1b9e9a

View File

@@ -70,13 +70,10 @@ struct DynamicStructInfo {
#define KERNEL_VERSION_6_6 KERNEL_VERSION(6, 6, 0) #define KERNEL_VERSION_6_6 KERNEL_VERSION(6, 6, 0)
#define KERNEL_VERSION_6_1 KERNEL_VERSION(6, 1, 0) #define KERNEL_VERSION_6_1 KERNEL_VERSION(6, 1, 0)
#define KERNEL_VERSION_5_15 KERNEL_VERSION(5, 15, 0) #define KERNEL_VERSION_5_15 KERNEL_VERSION(5, 15, 0)
#define KERNEL_VERSION_5_10 KERNEL_VERSION(5, 10, 0) #define KERNEL_VERSION_5_10 KERNEL_VERSION(5, 10, 0)
#define KERNEL_VERSION_5_0 KERNEL_VERSION(5, 0, 0)
#define KERNEL_VERSION_4_14 KERNEL_VERSION(4, 14, 0) #define KERNEL_VERSION_4_14 KERNEL_VERSION(4, 14, 0)
@@ -122,7 +119,7 @@ DYNAMIC_STRUCT_BEGIN(kprobe)
#if LINUX_VERSION_CODE < KERNEL_VERSION_5_15 #if LINUX_VERSION_CODE < KERNEL_VERSION_5_15
DEFINE_MEMBER(kprobe, fault_handler) DEFINE_MEMBER(kprobe, fault_handler)
#endif #endif
#if LINUX_VERSION_CODE < KERNEL_VERSION_5_10 #if LINUX_VERSION_CODE < KERNEL_VERSION_5_0
DEFINE_MEMBER(kprobe, break_handler) DEFINE_MEMBER(kprobe, break_handler)
#endif #endif
DEFINE_MEMBER(kprobe, flags) DEFINE_MEMBER(kprobe, flags)