在 super_access.c 中添加对内核版本 4.14 的宏定义,并根据内核版本条件编译相关成员
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user