From 0b1bab5b01d346ed4ad1b00d4ba974e27a20f5fb Mon Sep 17 00:00:00 2001 From: Aquarius223 <47409494+Aquarius223@users.noreply.github.com> Date: Wed, 9 Aug 2023 22:17:56 +0800 Subject: [PATCH] kernel: Fix commit `7bdb8858` in Linux 4.9.y and Linux 4.4.y builds (#841) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * linux/uaccess.h is also required on 4.4 and 4.9 -- KernelSU version: 11184 -- KernelSU Manager signature size: 0x033b -- KernelSU Manager signature hash: 0xb0b91415 CC drivers/kernelsu/kernel_compat.o ../drivers/kernelsu/kernel_compat.c:159:9: error: use of undeclared identifier 'USER_DS' set_fs(USER_DS); ^ 1 error generated. make[4]: *** [../scripts/Makefile.build:314:drivers/kernelsu/kernel_compat.o] 错误 1 make[3]: *** [../scripts/Makefile.build:599:drivers/kernelsu] 错误 2 Change-Id: I19598c62a3ae901049ea99ef878fa5c1a15201fd Co-authored-by: stic-server-open <1138705738@qq.com> --- kernel/kernel_compat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/kernel_compat.c b/kernel/kernel_compat.c index 88e256d4..6bd6a46b 100644 --- a/kernel/kernel_compat.c +++ b/kernel/kernel_compat.c @@ -4,6 +4,9 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) #include "linux/sched/task.h" #include "linux/uaccess.h" +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) +#include "linux/uaccess.h" +#include "linux/sched.h" #else #include "linux/sched.h" #endif