From ee5d2f8c8423d38635557352afcb754f96363e4a Mon Sep 17 00:00:00 2001 From: weishu Date: Sun, 2 Jul 2023 19:06:31 +0800 Subject: [PATCH] kernel: fix compile err in old kernel --- kernel/kernel_compat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/kernel_compat.c b/kernel/kernel_compat.c index 96c59107..63377fc1 100644 --- a/kernel/kernel_compat.c +++ b/kernel/kernel_compat.c @@ -1,6 +1,11 @@ #include "linux/version.h" #include "linux/fs.h" #include "linux/nsproxy.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) +#include "linux/sched/task.h" +#else +#include "linux/sched.h" +#endif #include "klog.h" // IWYU pragma: keep #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)