x86: Fix sys_call_table type in asm/syscall.h v2
PATCH 1/1 x86: Fix sys_call_table type in asm/syscall.h v2
From: Andi Kleen <[email protected]>
Make the sys_call_table type defined in asm/syscall.h match the definition in syscall_64.c
v2: include asm/syscall.h in syscall_64.c too. I left uml alone because it doesn't have an syscall.h on its own and including the native one leads to other errors.
Signed-off-by Andi Kleen <[email protected]>
--- arch/x86/include/asm/syscall.h | 3 ++- arch/x86/kernel/syscall_64.c | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/include/asm/syscall.h +2 -1
@@ -16,7 +16,8 @@#include <linux/sched.h> #include <linux/err.h> -extern const unsigned long sys_call_table[]; +typedef void (*sys_call_ptr_t )(void ); +extern const sys_call_ptr_t sys_call_table[];/* * Only the low 32 bits of orig_ax are meaningful, so we return int.
arch/x86/kernel/syscall_64.c +1 -2
@@ -4,6 +4,7 @@#include <linux/sys.h> #include <linux/cache.h> #include <asm/asm-offsets.h> +#include <asm/syscall.h> #define __NO_STUBS
@@ -15,8 +16,6 @@#define __SYSCALL (nr, sym) [nr] = sym,#undef _ASM_X86_UNISTD_64_H -typedef void (*sys_call_ptr_t )(void ); -extern void sys_ni_syscall (void ); asmlinkage const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {
Signature · 1 line
1.7.4.4