kernel: Adapt Makefile for < k3.7

This commit is contained in:
Trijal Saha
2025-05-20 17:48:25 -04:00
committed by Rifat Azad
parent 69f8a2a5d6
commit fad59b6e54
2 changed files with 8 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ kernelsu-objs += selinux/selinux.o
kernelsu-objs += selinux/sepolicy.o
kernelsu-objs += selinux/rules.o
ccflags-y += -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include
ccflags-y += -I$(objtree)/security/selinux -include $(srctree)/include/uapi/asm-generic/errno.h
ccflags-y += -I$(objtree)/security/selinux -include $(objtree)/include/errno.h
obj-$(CONFIG_KSU) += kernelsu.o

7
kernel/include/errno.h Normal file
View File

@@ -0,0 +1,7 @@
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
#include <uapi/asm-generic/errno-base.h> // For kernels 3.7 and newer
#else
#include <asm-generic/errno-base.h> // For kernels older than 3.7
#endif