kernel: fix build (#603)

This commit is contained in:
YangQi0408
2025-11-19 12:54:11 +08:00
committed by GitHub
parent 957999ba09
commit 9856539f1f

View File

@@ -351,7 +351,13 @@ int ksu_handle_devpts(struct inode *inode)
return 0;
if (ksu_file_sid) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) || \
defined(KSU_OPTIONAL_SELINUX_INODE)
struct inode_security_struct *sec = selinux_inode(inode);
#else
struct inode_security_struct *sec =
(struct inode_security_struct *)inode->i_security;
#endif
if (sec) {
sec->sid = ksu_file_sid;
}