kernel: fix compile err on lower kernel

This commit is contained in:
weishu
2023-06-27 20:46:09 +08:00
parent 0bfd6d9e30
commit da959b4e17
3 changed files with 12 additions and 16 deletions

View File

@@ -16,16 +16,11 @@
#include "arch.h"
#include "klog.h" // IWYU pragma: keep
#include "ksud.h"
#include "kernel_compat.h"
#define SU_PATH "/system/bin/su"
#define SH_PATH "/system/bin/sh"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
#define ksu_strncpy_from_user_nofault strncpy_from_user_nofault
#else
#define ksu_strncpy_from_user_nofault strncpy_from_unsafe_user
#endif
extern void escape_to_root();
static void __user *userspace_stack_buffer(const void *d, size_t len)