kernel/manual_su: Define mmap_lock as mmap_sem for old kernel (#495)
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 7, 0)
|
||||
#define mmap_lock mmap_sem
|
||||
#endif
|
||||
|
||||
#define KSU_SU_VERIFIED_BIT (1UL << 0)
|
||||
#define KSU_TOKEN_LENGTH 32
|
||||
#define KSU_TOKEN_ENV_NAME "KSU_AUTH_TOKEN"
|
||||
@@ -25,4 +29,4 @@ char* ksu_generate_auth_token(void);
|
||||
bool ksu_verify_auth_token(const char *token);
|
||||
void ksu_cleanup_expired_tokens(void);
|
||||
extern bool current_verified;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user