kernel: Resolving compilation issues once more

This commit is contained in:
ShirkNeko
2025-11-06 15:18:39 +08:00
parent 3382574aad
commit e8ecb9a33b
5 changed files with 44 additions and 688 deletions

View File

@@ -10,6 +10,7 @@ kernelsu-objs += feature.o
kernelsu-objs += ksud.o
kernelsu-objs += embed_ksud.o
kernelsu-objs += kernel_compat.o
kernelsu-objs += throne_tracker.o
kernelsu-objs += throne_comm.o
kernelsu-objs += sulog.o
@@ -18,14 +19,6 @@ ccflags-y += -DCONFIG_KSU_MANUAL_SU
kernelsu-objs += manual_su.o
endif
ifeq ($(CONFIG_KSU_THRONE_TRACKER_LEGACY),y)
$(info -- KernelSU/compat: using legacy throne tracker)
kernelsu-objs += throne_tracker_legacy.o
else
$(info -- KernelSU/compat: using new throne tracker)
kernelsu-objs += throne_tracker.o
endif
kernelsu-objs += selinux/selinux.o
kernelsu-objs += selinux/sepolicy.o
kernelsu-objs += selinux/rules.o
@@ -34,7 +27,6 @@ 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
obj-$(CONFIG_KSU) += kernelsu.o
obj-$(CONFIG_KSU_TRACEPOINT_HOOK) += ksu_trace_export.o
obj-$(CONFIG_KPM) += kpm/
@@ -163,12 +155,6 @@ ifeq ($(shell grep -q "SEC_SELINUX_PORTING_COMMON" $(srctree)/security/selinux/a
ccflags-y += -DSAMSUNG_SELINUX_PORTING
endif
# Check new vfs_getattr()
ifeq ($(shell grep -A1 "^int vfs_getattr" $(srctree)/fs/stat.c | grep -q "query_flags" ; echo $$?),0)
$(info -- KernelSU/compat: new vfs_getattr() found)
ccflags-y += -DKSU_HAS_NEW_VFS_GETATTR
endif
# Function proc_ops check
ifeq ($(shell grep -q "struct proc_ops " $(srctree)/include/linux/proc_fs.h; echo $$?),0)
ccflags-y += -DKSU_COMPAT_HAS_PROC_OPS