From patchwork Wed Sep 3 03:44:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 385380 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 D1E4D1401FA for ; Wed, 3 Sep 2014 13:45:48 +1000 (EST) Received: from localhost ([::1]:41300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP1Vy-0004Xa-PW for incoming@patchwork.ozlabs.org; Tue, 02 Sep 2014 23:45:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP1VQ-0003x7-UD for qemu-devel@nongnu.org; Tue, 02 Sep 2014 23:45:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP1VM-0006g8-3Y for qemu-devel@nongnu.org; Tue, 02 Sep 2014 23:45:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP1VL-0006fO-Sk for qemu-devel@nongnu.org; Tue, 02 Sep 2014 23:45:08 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s833j58l002600 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 2 Sep 2014 23:45:05 -0400 Received: from T430.redhat.com (vpn1-115-42.nay.redhat.com [10.66.115.42]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s833iv7G026900; Tue, 2 Sep 2014 23:45:02 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Wed, 3 Sep 2014 11:44:55 +0800 Message-Id: <1409715896-14322-3-git-send-email-famz@redhat.com> In-Reply-To: <1409715896-14322-1-git-send-email-famz@redhat.com> References: <1409715896-14322-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Paolo Bonzini , Stefan Hajnoczi , peter.maydell@linaro.org Subject: [Qemu-devel] [PATCH 2/3] util: Move general qemu_getauxval to util/getauxval.c 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 So that we won't have an empty getauxval.o which is disliked by ranlib. Reported-by: Peter Maydell Suggested-by: Paolo Bonzini@redhat.com Signed-off-by: Fam Zheng --- include/qemu/osdep.h | 4 ---- util/getauxval.c | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 9dd43fc..1565404 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -246,11 +246,7 @@ char *qemu_get_exec_dir(void); * Search the auxiliary vector for @type, returning the value * or 0 if @type is not present. */ -#if defined(CONFIG_GETAUXVAL) || defined(__linux__) unsigned long qemu_getauxval(unsigned long type); -#else -static inline unsigned long qemu_getauxval(unsigned long type) { return 0; } -#endif void qemu_set_tty_echo(int fd, bool echo); diff --git a/util/getauxval.c b/util/getauxval.c index 25f48e5..1732ace 100644 --- a/util/getauxval.c +++ b/util/getauxval.c @@ -98,4 +98,12 @@ unsigned long qemu_getauxval(unsigned long type) return 0; } + +#else + +unsigned long qemu_getauxval(unsigned long type) +{ + return 0; +} + #endif