kernel: fix build (#609)
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
@@ -165,8 +165,10 @@ DYNAMIC_STRUCT_BEGIN(task_struct)
|
|||||||
#ifdef CONFIG_CGROUPS
|
#ifdef CONFIG_CGROUPS
|
||||||
DEFINE_MEMBER(task_struct, cgroups)
|
DEFINE_MEMBER(task_struct, cgroups)
|
||||||
#endif
|
#endif
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
#ifdef CONFIG_SECURITY
|
#ifdef CONFIG_SECURITY
|
||||||
DEFINE_MEMBER(task_struct, security)
|
DEFINE_MEMBER(task_struct, security)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
DEFINE_MEMBER(task_struct, thread)
|
DEFINE_MEMBER(task_struct, thread)
|
||||||
DYNAMIC_STRUCT_END(task_struct)
|
DYNAMIC_STRUCT_END(task_struct)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include <linux/file.h>
|
#include <linux/file.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
|
||||||
#include <linux/sched/task.h>
|
#include <linux/sched/task.h>
|
||||||
#endif
|
#endif
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
|
||||||
|
|||||||
@@ -66,16 +66,16 @@ static int add_mark_on_inode(struct inode *inode, u32 mask,
|
|||||||
if (!m)
|
if (!m)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
||||||
fsnotify_init_mark(m, g);
|
fsnotify_init_mark(m, g);
|
||||||
m->mask = mask;
|
m->mask = mask;
|
||||||
ret = fsnotify_add_inode_mark(m, inode, 0);
|
ret = fsnotify_add_inode_mark(m, inode, 0);
|
||||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
fsnotify_init_mark(m, g);
|
fsnotify_init_mark(m, g);
|
||||||
m->mask = mask;
|
m->mask = mask;
|
||||||
ret = fsnotify_add_mark(m, inode, NULL, 0);
|
ret = fsnotify_add_mark(m, inode, NULL, 0);
|
||||||
#else
|
#else
|
||||||
fsnotify_init_mark(m, g, m_free);
|
fsnotify_init_mark(m, m_free);
|
||||||
m->mask = mask;
|
m->mask = mask;
|
||||||
ret = fsnotify_add_mark(m, g, inode, NULL, 0);
|
ret = fsnotify_add_mark(m, g, inode, NULL, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user