From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSZHk-0004Q2-Os for qemu-devel@nongnu.org; Tue, 25 Mar 2014 17:53:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSZHe-0001xS-E1 for qemu-devel@nongnu.org; Tue, 25 Mar 2014 17:53:28 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:39864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSZHe-0001xJ-8a for qemu-devel@nongnu.org; Tue, 25 Mar 2014 17:53:22 -0400 Received: by mail-wg0-f43.google.com with SMTP id x13so639600wgg.2 for ; Tue, 25 Mar 2014 14:53:21 -0700 (PDT) Sender: James Hogan From: James Hogan Date: Tue, 25 Mar 2014 21:51:08 +0000 Message-Id: <1395784268-31712-1-git-send-email-james.hogan@imgtec.com> Subject: [Qemu-devel] [PATCH] linux-user: Handle arches with llseek instead of _llseek List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio , James Hogan , Jia Liu Recently merged kernel ports (such as OpenRISC and Meta) have an llseek system call instead of _llseek. This is handled for the host architecture by defining __NR__llseek as __NR_llseek, but not for the target architecture. Handle it in the same way for these architectures, defining TARGET_NR__llseek as TARGET_NR_llseek. Signed-off-by: James Hogan Cc: Riku Voipio Cc: Jia Liu --- linux-user/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 2eac6d5..8dbe39b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -198,6 +198,11 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \ #define __NR__llseek __NR_lseek #endif +/* Newer kernel ports have llseek() instead of _llseek() */ +#if defined(TARGET_NR_llseek) && !defined(TARGET_NR__llseek) +#define TARGET_NR__llseek TARGET_NR_llseek +#endif + #ifdef __NR_gettid _syscall0(int, gettid) #else -- 1.8.3.2