From fe11fcd6c6901ad98ad475e0c427dbfb55a27536 Mon Sep 17 00:00:00 2001 From: SlightlyLookAround <98880148+SlightlyLookAround@users.noreply.github.com> Date: Sun, 22 Jan 2023 11:32:28 +0800 Subject: [PATCH] kernel: Migrate the reference of task_stack() (#102) - task_stack() had been separated when it was in Linux 4.11, so let's do our migration when KernelSU facing the old version of kernel. - See https://github.com/gregkh/linux/commit/f3ac60671954c8d413532627b1be13a76f394c49 Signed-off-by: Calling Signed-off-by: Calling --- kernel/sucompat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/sucompat.c b/kernel/sucompat.c index 2b64bc09..2eaa49ab 100644 --- a/kernel/sucompat.c +++ b/kernel/sucompat.c @@ -15,9 +15,13 @@ #include #include #include -#include #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) +#include +#else +#include +#endif #include #include