aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@web.de>2010-04-19 17:53:07 -0400
committerJiri Kosina <jkosina@suse.cz>2010-05-10 17:38:15 -0400
commitce60d4d5d50a5454768faa522da98aa5f8070bd0 (patch)
tree4a81d5b5e317565604ef9fabc515184b88f70148 /arch/um
parenta8cd4561ea176f51e9f4707873ca4eff8fd5ee70 (diff)
uml: i386: Avoid redefinition of NR_syscalls
The i386 subarch happens to pull in original NR_syscalls. Maybe we can make that work for all host arch, but for now just avoid the clash by using an all-upper-case name. CC arch/um/kernel/skas/syscall.o/data/linux-2.6/arch/um/kernel/skas/syscall.c:13:1: warning: "NR_syscalls" redefined In file included from /data/linux-2.6/arch/x86/include/asm/unistd.h:3, from /data/linux-2.6/arch/um/sys-i386/shared/sysdep/syscalls.h:6, from /data/linux-2.6/arch/um/kernel/skas/syscall.c:10: /data/linux-2.6/arch/x86/include/asm/unistd_32.h:349:1: warning: this is the location of the previous definition Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/kernel/skas/syscall.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c
index 4e3b820bd2be..f5173e1ec3ac 100644
--- a/arch/um/kernel/skas/syscall.c
+++ b/arch/um/kernel/skas/syscall.c
@@ -10,7 +10,7 @@
10#include "sysdep/syscalls.h" 10#include "sysdep/syscalls.h"
11 11
12extern int syscall_table_size; 12extern int syscall_table_size;
13#define NR_syscalls (syscall_table_size / sizeof(void *)) 13#define NR_SYSCALLS (syscall_table_size / sizeof(void *))
14 14
15void handle_syscall(struct uml_pt_regs *r) 15void handle_syscall(struct uml_pt_regs *r)
16{ 16{
@@ -30,7 +30,7 @@ void handle_syscall(struct uml_pt_regs *r)
30 * in case it's a compiler bug. 30 * in case it's a compiler bug.
31 */ 31 */
32 syscall = UPT_SYSCALL_NR(r); 32 syscall = UPT_SYSCALL_NR(r);
33 if ((syscall >= NR_syscalls) || (syscall < 0)) 33 if ((syscall >= NR_SYSCALLS) || (syscall < 0))
34 result = -ENOSYS; 34 result = -ENOSYS;
35 else result = EXECUTE_SYSCALL(syscall, regs); 35 else result = EXECUTE_SYSCALL(syscall, regs);
36 36