kernel: Fix compilation for non-gki kernels
Co-authored-by: TwinbornPlate75 <3342733415@qq.com>
This commit is contained in:
@@ -383,10 +383,16 @@ static int do_get_wrapper_fd(void __user *arg) {
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
|
||||
#define getfd_secure anon_inode_create_getfd
|
||||
#else
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||
#define getfd_secure anon_inode_getfd_secure
|
||||
#else
|
||||
#define getfd_secure anon_inode_getfd
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||
ret = getfd_secure("[ksu_fdwrapper]", &data->ops, data, f->f_flags, NULL);
|
||||
#else
|
||||
ret = getfd_secure("[ksu_fdwrapper]", &data->ops, data, f->f_flags);
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
pr_err("ksu_fdwrapper: getfd failed: %d\n", ret);
|
||||
goto put_wrapper_data;
|
||||
|
||||
Reference in New Issue
Block a user