lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080131151741.GE2471@hacking>
Date:	Thu, 31 Jan 2008 23:17:41 +0800
From:	WANG Cong <xiyou.wangcong@...il.com>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Jeff Dike <jdike@...aya.com>,
	user-mode-linux-devel@...ts.sourceforge.net
Subject: [git Patch] UML: a build error fix


This patch fixed this error:

arch/um/kernel/skas/syscall.c: In function 'handle_syscall':
arch/um/kernel/skas/syscall.c:33: error: 'NR_syscalls' undeclared (first use in this function)
arch/um/kernel/skas/syscall.c:33: error: (Each undeclared identifier is reported only once
arch/um/kernel/skas/syscall.c:33: error: for each function it appears in.)
make[2]: *** [arch/um/kernel/skas/syscall.o] Error 1
make[1]: *** [arch/um/kernel/skas] Error 2
make: *** [arch/um/kernel] Error 2


Cc: Jeff Dike <jdike@...aya.com>
Signed-off-by: WANG Cong <xiyou.wangcong@...il.com>

---

diff --git a/arch/um/include/sysdep-i386/kernel-offsets.h b/arch/um/include/sysdep-i386/kernel-offsets.h
index 5868526..da820d2 100644
--- a/arch/um/include/sysdep-i386/kernel-offsets.h
+++ b/arch/um/include/sysdep-i386/kernel-offsets.h
@@ -15,7 +15,11 @@
 #define OFFSET(sym, str, mem) \
 	DEFINE(sym, offsetof(struct str, mem));
 
+static char syscalls[] = {
+#include <asm/arch/unistd.h>
+};
 void foo(void)
 {
 #include <common-offsets.h>
+DEFINE(UM_NR_syscall_max, sizeof(syscalls) - 1);
 }
diff --git a/arch/um/include/sysdep-i386/syscalls.h b/arch/um/include/sysdep-i386/syscalls.h
index 57bd79e..fb1fd94 100644
--- a/arch/um/include/sysdep-i386/syscalls.h
+++ b/arch/um/include/sysdep-i386/syscalls.h
@@ -5,6 +5,7 @@
 
 #include "asm/unistd.h"
 #include "sysdep/ptrace.h"
+#include "kern_constants.h"
 
 typedef long syscall_handler_t(struct pt_regs);
 
@@ -23,3 +24,6 @@ extern syscall_handler_t *sys_call_table[];
 extern long sys_mmap2(unsigned long addr, unsigned long len,
 		      unsigned long prot, unsigned long flags,
 		      unsigned long fd, unsigned long pgoff);
+
+#define NR_syscalls (UM_NR_syscall_max + 1)
+
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ