在 super_access.c 中添加对内核版本 4.14 的宏定义,并根据内核版本条件编译相关成员

This commit is contained in:
ShirkNeko
2025-04-12 16:16:06 +08:00
parent 662d5494b2
commit 44d85cfdd7

View File

@@ -70,6 +70,8 @@ struct DynamicStructInfo {
#define KERNEL_VERSION_6_1 KERNEL_VERSION(6, 1, 0)
#define KERNEL_VERSION_4_14 KERNEL_VERSION(4, 14, 0)
#include <../fs/mount.h>
#include <linux/mount.h>
@@ -112,6 +114,9 @@ DYNAMIC_STRUCT_BEGIN(kprobe)
DEFINE_MEMBER(kprobe, post_handler)
#if LINUX_VERSION_CODE < KERNEL_VERSION_6_1
DEFINE_MEMBER(kprobe, fault_handler)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION_4_14
DEFINE_MEMBER(kprobe, break_handler)
#endif
DEFINE_MEMBER(kprobe, flags)
DYNAMIC_STRUCT_END(kprobe)