kernel: Fix compilation for non-gki kernels (#547)

* kernel: Fix compilation for non-gki kernels

* kernel: Check if selinux_state exists rather than depends on version code
This commit is contained in:
TwinbornPlate75
2025-11-08 18:07:09 +08:00
committed by GitHub
parent 8ff469d00e
commit 4f7042ca44
4 changed files with 24 additions and 3 deletions

View File

@@ -5,7 +5,7 @@
#include <linux/version.h>
#include "linux/sched.h"
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || defined(KSU_COMPAT_HAS_SELINUX_STATE)
#ifdef KSU_COMPAT_HAS_SELINUX_STATE
#define KSU_COMPAT_USE_SELINUX_STATE
#endif