syscalls: add sys_ni_posix_timers prototype
authorArnd Bergmann <arnd@arndb.de>
Wed, 7 Jun 2023 14:28:45 +0000 (16:28 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 10 Jun 2023 00:44:25 +0000 (17:44 -0700)
The sys_ni_posix_timers() definition causes a warning when the declaration
is missing, so this needs to be added along with the normal syscalls,
outside of the #ifdef.

kernel/time/posix-stubs.c:26:17: error: no previous prototype for 'sys_ni_posix_timers' [-Werror=missing-prototypes]

Link: https://lkml.kernel.org/r/20230607142925.3126422-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/alpha/kernel/osf_sys.c
include/linux/syscalls.h
kernel/time/posix-stubs.c

index 2a9a877a0508371fdfd167c256c66ca16104916e..d98701ee36c6a82f4c7385720f26b2dc356d3a2e 100644 (file)
@@ -1014,8 +1014,6 @@ SYSCALL_DEFINE2(osf_settimeofday, struct timeval32 __user *, tv,
        return do_sys_settimeofday64(tv ? &kts : NULL, tz ? &ktz : NULL);
 }
 
-asmlinkage long sys_ni_posix_timers(void);
-
 SYSCALL_DEFINE2(osf_utimes, const char __user *, filename,
                struct timeval32 __user *, tvs)
 {
index 33a0ee3bcb2ed9b4ac9db5d65c1ab4bc99750a87..24871f8ec8bb6c8cfa940bca145b35d265ba722b 100644 (file)
@@ -1280,6 +1280,7 @@ asmlinkage long sys_ni_syscall(void);
 
 #endif /* CONFIG_ARCH_HAS_SYSCALL_WRAPPER */
 
+asmlinkage long sys_ni_posix_timers(void);
 
 /*
  * Kernel code should not call syscalls (i.e., sys_xyzyyz()) directly.
index 828aeecbd1e8a92385f1ee658db24ae0dbaaf73c..39769b2d1005ecfe48cd5d4a7ba16f971a7d7924 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/posix-timers.h>
 #include <linux/time_namespace.h>
 #include <linux/compat.h>
+#include <linux/syscalls.h>
 
 #ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
 /* Architectures may override SYS_NI and COMPAT_SYS_NI */