kernel: move some defs to single file

* Much cleaner code, although setenforce is not used anymore
* Guard is_ksu_transition only for 4.19 and under.

Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
This commit is contained in:
rsuntk
2025-08-14 22:32:02 +07:00
committed by ShirkNeko
parent 68f2f5a0ae
commit deed7a7903
3 changed files with 59 additions and 46 deletions

View File

@@ -1,8 +1,8 @@
#ifndef __KSU_H_SELINUX
#define __KSU_H_SELINUX
#include "linux/types.h"
#include "linux/version.h"
#include <linux/types.h>
#include <linux/version.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || defined(KSU_COMPAT_HAS_SELINUX_STATE)
#define KSU_COMPAT_USE_SELINUX_STATE
@@ -12,7 +12,7 @@ void setup_selinux(const char *);
void setenforce(bool);
bool getenforce();
bool getenforce(void);
bool is_ksu_domain();