diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2023-05-17 15:10:52 +0200 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2026-03-04 07:19:20 -0500 |
| commit | 990d2bab3782ea534ae747b303edaebbeb467e29 (patch) | |
| tree | c1c828b3345816f33a3e5a5aa61e1bda75fcde5d /include | |
| parent | 986455135b95f32c1f142068e451098fc751749e (diff) | |
audit: avoid missing-prototype warnings
[ Upstream commit e455ca40dbcf2cd50d1e59bf4b2752b300bcdad4 ]
Building with 'make W=1' reveals two function definitions without
a previous prototype in the audit code:
lib/compat_audit.c:32:5: error: no previous prototype for 'audit_classify_compat_syscall' [-Werror=missing-prototypes]
kernel/audit.c:1813:14: error: no previous prototype for 'audit_serial' [-Werror=missing-prototypes]
The first one needs a declaration from linux/audit.h but cannot
include that header without causing conflicting (compat) syscall number
definitions, so move the it into linux/audit_arch.h.
The second one is declared conditionally based on CONFIG_AUDITSYSCALL
but needed as a local function even when that option is disabled, so
move the declaration out of the #ifdef block.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Stable-dep-of: 76489955c6d4 ("audit: move the compat_xxx_class[] extern declarations to audit_arch.h")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/audit.h | 2 | ||||
| -rw-r--r-- | include/linux/audit_arch.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 3608992848d3..6efadd7f60a5 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -129,8 +129,6 @@ extern unsigned compat_dir_class[]; extern unsigned compat_chattr_class[]; extern unsigned compat_signal_class[]; -extern int audit_classify_compat_syscall(int abi, unsigned syscall); - /* audit_names->type values */ #define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */ #define AUDIT_TYPE_NORMAL 1 /* a "normal" audit record */ diff --git a/include/linux/audit_arch.h b/include/linux/audit_arch.h index 8fdb1afe251a..0e34d673ef17 100644 --- a/include/linux/audit_arch.h +++ b/include/linux/audit_arch.h @@ -21,4 +21,6 @@ enum auditsc_class_t { AUDITSC_NVALS /* count */ }; +extern int audit_classify_compat_syscall(int abi, unsigned syscall); + #endif |
