From patchwork Tue Mar 25 21:51:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hogan X-Patchwork-Id: 333729 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D9858140085 for ; Wed, 26 Mar 2014 08:53:51 +1100 (EST) Received: from localhost ([::1]:44398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSZI5-0004qw-9R for incoming@patchwork.ozlabs.org; Tue, 25 Mar 2014 17:53:49 -0400 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=lUBB4BCdOD2bTpMLXD0NHPjfEUDfGpgRdQw97oUsAN8=; b=ICbVQrUwMlq6+GyZCmS2nCXsqP0OZNCnwedXERyP6ub4gnpXR5wRgxp7wne81Hg9tm WSoCW0FBnRxJQm0/jDYMdaTq8HsbS47HmCrYnDahuGLWa/o1M4VOsTTlclA5MkCTjCmd O8aROyKJ/zp7pDjMWn4jr/nytKztI8agHfyvYsrRiLWEDqda1eNZUcVp4QVzfzLgP5f7 pIhI0C35a5kzu83XCbzen3RAnM+ygIho5vRTeCi85KypeSkkaJpPWvVefcoeTjwbeRqW MQ/IFIYd9tJJ7Um2veyKYLlcJJ2Glh+RDfjRo/iuWHO+sl1SN9dPa7hG0laNcaTjC1qn 1IaQ== X-Gm-Message-State: ALoCoQn4hD2yOh5P2UQX0qzjlN5yMQVZnDfDE46dEaNnuZTPXgAAXxJZ1jrd6eghEyf5jAzvrhtu X-Received: by 10.180.184.167 with SMTP id ev7mr57954wic.55.1395784401287; Tue, 25 Mar 2014 14:53:21 -0700 (PDT) Received: from localhost.localdomain (jahogan.plus.com. [212.159.75.221]) by mx.google.com with ESMTPSA id h19sm11836224wiw.17.2014.03.25.14.53.19 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Tue, 25 Mar 2014 14:53:20 -0700 (PDT) From: James Hogan To: qemu-devel@nongnu.org Date: Tue, 25 Mar 2014 21:51:08 +0000 Message-Id: <1395784268-31712-1-git-send-email-james.hogan@imgtec.com> X-Mailer: git-send-email 1.8.3.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.43 Cc: Riku Voipio , James Hogan , Jia Liu Subject: [Qemu-devel] [PATCH] 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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