From patchwork Fri May 2 19:15:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 29575 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D2C18203F3 for ; Fri, 2 May 2014 19:19:40 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf25911246iec.2 for ; Fri, 02 May 2014 12:19:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=A5KtA7UCpstIc+I4dWjxaBftjeUpNAkFsU48btAOM1U=; b=HpA320Iko4Pu6xvUX4Mzz65xE3M3qX4qp1d0fmImdUMEACOw03viGudRAE7hxaIG8Y eNIcy/Zs3AWF7KqXnVCdkiM0Ag4321dsg1hKxgKT2LXmc6zKp6IF+icvnAJROPbLCkQ8 9TNip5hy086kyNDMlrpnb5MJt2l9FMdC6bsTCIW0W2h+CID2MhFMVCFnFNu8G1rXCuUr 7oRpeUyvRYjaH3nY0nYWDP4YtCKfw9la/MpQSKCrcomfjRuOeDlEwyNkT5QvjrqJa5RR HNtpYLygEp7DxOdBPrg7cL+rnUzDbCimEzZc7me9YgOCpQ7alvtsu3IS8EGGypG0Vuvi SKZQ== X-Gm-Message-State: ALoCoQnL34Kh5B2Au5/cRt2cILLTU/JXFizADFQzPulklZwOu1bPoOaSPRnBviWL+pKpZZKLe4mK X-Received: by 10.50.73.74 with SMTP id j10mr2760818igv.1.1399058380330; Fri, 02 May 2014 12:19:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.68 with SMTP id q62ls1756170qgd.27.gmail; Fri, 02 May 2014 12:19:40 -0700 (PDT) X-Received: by 10.52.118.212 with SMTP id ko20mr758861vdb.77.1399058380221; Fri, 02 May 2014 12:19:40 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id w15si6920141vcz.181.2014.05.02.12.19.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 May 2014 12:19:40 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id ib6so5847645vcb.33 for ; Fri, 02 May 2014 12:19:40 -0700 (PDT) X-Received: by 10.58.216.163 with SMTP id or3mr31393vec.80.1399058380152; Fri, 02 May 2014 12:19:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp125944vcb; Fri, 2 May 2014 12:19:39 -0700 (PDT) X-Received: by 10.224.43.202 with SMTP id x10mr16964932qae.33.1399058379539; Fri, 02 May 2014 12:19:39 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id r90si14625909qgr.173.2014.05.02.12.19.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 02 May 2014 12:19:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:45972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgIzj-0004fI-04 for patch@linaro.org; Fri, 02 May 2014 15:19:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgIwE-00083X-Fj for qemu-devel@nongnu.org; Fri, 02 May 2014 15:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgIw5-0000BA-CL for qemu-devel@nongnu.org; Fri, 02 May 2014 15:16:02 -0400 Received: from afflict.kos.to ([92.243.29.197]:48074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgIw5-00009X-3u for qemu-devel@nongnu.org; Fri, 02 May 2014 15:15:53 -0400 Received: from localhost.localdomain (afflict [92.243.29.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id C5377264CC; Fri, 2 May 2014 21:15:50 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 2 May 2014 22:15:40 +0300 Message-Id: X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Cc: peter.maydell@linaro.org, Riku Voipio , James Hogan , Jia Liu Subject: [Qemu-devel] [PULL 05/14] linux-user: Handle arches with llseek instead of _llseek X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: James Hogan 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 Signed-off-by: Riku Voipio --- linux-user/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 27073b1..15de6f8 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