From patchwork Tue Aug 23 12:20:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 111086 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id C9152B74A2 for ; Tue, 23 Aug 2011 22:43:38 +1000 (EST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id B9D1EB6F7E for ; Tue, 23 Aug 2011 22:20:27 +1000 (EST) Received: by wwg9 with SMTP id 9so37782wwg.14 for ; Tue, 23 Aug 2011 05:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:subject:date:user-agent:organization:mime-version :content-type:content-transfer-encoding:message-id; bh=b52MzS/8u836f7AJopYvIn4IHwVDEFSiTOCE/TlKlsw=; b=dScAhVlKXgsZ2yyf4qcWlXMmeAp0KMnyhncJKDADGUY8EWl5wDQr/ICYHRxtddx8Ba s0qMQZatXoa4kPwT6I7/prXfJGiVVCzU6+rh6fdu2M0sNBUZqkRz/ebreHamUfsxmCIX 1B+TDtXkAqS51h6uKhWjQ2dco92fSjPapWvJU= Received: by 10.227.196.196 with SMTP id eh4mr197991wbb.23.1314102022363; Tue, 23 Aug 2011 05:20:22 -0700 (PDT) Received: from flexo.localnet (bobafett.staff.proxad.net [213.228.1.121]) by mx.google.com with ESMTPS id ej15sm100637wbb.48.2011.08.23.05.20.20 (version=SSLv3 cipher=OTHER); Tue, 23 Aug 2011 05:20:21 -0700 (PDT) From: Florian Fainelli To: Ian Munsie , linuxppc-dev@lists.ozlabs.org Subject: [PATCH] perf: fix build for PowerPC with uclibc toolchains Date: Tue, 23 Aug 2011 14:20:08 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-server; KDE/4.6.2; x86_64; ; ) Organization: OpenWrt MIME-Version: 1.0 Message-Id: <201108231420.08879.florian@openwrt.org> X-Mailman-Approved-At: Tue, 23 Aug 2011 22:43:31 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org libio.h is not provided by uClibc, in order to be able to test the definition of __UCLIBC__ we need to include stdlib.h, which also includes stddef.h, providing the definition of 'NULL'. Signed-off-by: Florian Fainelli --- FYI, I submitted the exact same patch for ARM: https://patchwork.kernel.org/patch/1049152/ diff --git a/tools/perf/arch/powerpc/util/dwarf-regs.c b/tools/perf/arch/powerpc/util/dwarf-regs.c index 48ae0c5..7cdd61d 100644 --- a/tools/perf/arch/powerpc/util/dwarf-regs.c +++ b/tools/perf/arch/powerpc/util/dwarf-regs.c @@ -9,7 +9,10 @@ * 2 of the License, or (at your option) any later version. */ +#include +#ifndef __UCLIBC__ #include +#endif #include