kernel: Fix compilation for non-gki kernels
Co-authored-by: TwinbornPlate75 <3342733415@qq.com>
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/version.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
|
||||
#include <linux/sched/task.h>
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
|
||||
#include <linux/compiler_types.h>
|
||||
#endif
|
||||
@@ -418,7 +421,11 @@ void persistent_allow_list()
|
||||
goto put_task;
|
||||
}
|
||||
cb->func = do_persistent_allow_list;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
|
||||
task_work_add(tsk, cb, TWA_RESUME);
|
||||
#else
|
||||
task_work_add(tsk, cb, true);
|
||||
#endif
|
||||
|
||||
put_task:
|
||||
put_task_struct(tsk);
|
||||
|
||||
Reference in New Issue
Block a user