kernel: fix -Wstrict-prototypes warnings/errors

* On newer kernel for some reason -Wno-strict-prototypes still does not fix the errors or warnings.
* To fix it, we just need to add void type.

Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
This commit is contained in:
rsuntk
2025-08-28 15:46:22 +07:00
committed by ShirkNeko
parent a670b82bb6
commit 1294bbe853
13 changed files with 41 additions and 41 deletions

View File

@@ -37,7 +37,7 @@ static struct policydb *get_policydb(void)
}
static DEFINE_MUTEX(ksu_rules);
void apply_kernelsu_rules()
void apply_kernelsu_rules(void)
{
struct policydb *db;
@@ -210,7 +210,7 @@ static int get_object(char *buf, char __user *user_object, size_t buf_sz,
}
// reset avc cache table, otherwise the new rules will not take effect if already denied
static void reset_avc_cache()
static void reset_avc_cache(void)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0) || \
!defined(KSU_COMPAT_USE_SELINUX_STATE)

View File

@@ -93,7 +93,7 @@ static inline u32 current_sid(void)
}
#endif
bool is_ksu_domain()
bool is_ksu_domain(void)
{
char *domain;
u32 seclen;
@@ -132,7 +132,7 @@ bool is_zygote(void *sec)
#define DEVPTS_DOMAIN "u:object_r:ksu_file:s0"
u32 ksu_get_devpts_sid()
u32 ksu_get_devpts_sid(void)
{
u32 devpts_sid = 0;
int err = security_secctx_to_secid(DEVPTS_DOMAIN, strlen(DEVPTS_DOMAIN),

View File

@@ -15,12 +15,12 @@ void setenforce(bool);
bool getenforce(void);
bool is_ksu_domain();
bool is_ksu_domain(void);
bool is_zygote(void *cred);
void apply_kernelsu_rules();
void apply_kernelsu_rules(void);
u32 ksu_get_devpts_sid();
u32 ksu_get_devpts_sid(void);
#endif