Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754653Ab0DDOhl (ORCPT ); Sun, 4 Apr 2010 10:37:41 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]:53038 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754515Ab0DDOhD (ORCPT ); Sun, 4 Apr 2010 10:37:03 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; b=LhxKOrWHL+LBccqdyeOfPfBIykvgiAijORDCR1CifBOVla2EQe7V/er49/vpptb1SI 68AzY33Lev+UAm2EbSRbdKR4Tgp+2VLkX6q8WaVo1c0jD0fdBZfMPXcDyPFMDa8NWTfw v7fW0NabTZTp9vbQPDmVeNJRa0hfZUxTPUcVk= From: Frederic Weisbecker To: Ingo Molnar Cc: LKML , Hitoshi Mitake , Peter Zijlstra , Paul Mackerras , Arnaldo Carvalho de Melo , Frederic Weisbecker Subject: [PATCH 4/4] Swap inclusion order of util.h and string.h in util/string.c Date: Sun, 4 Apr 2010 16:36:44 +0200 Message-Id: <1270391804-6552-5-git-send-regression-fweisbec@gmail.com> X-Mailer: git-send-email 1.6.2.3 In-Reply-To: <1270391804-6552-1-git-send-regression-fweisbec@gmail.com> References: <1270391804-6552-1-git-send-regression-fweisbec@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1623 Lines: 47 From: Hitoshi Mitake Currently util/string.c includes headers in this order: string.h, util.h But this causes a build error because __USE_GNU definition is needed for strndup() definition: % make -j touch .perf.dev.null CC util/string.o cc1: warnings being treated as errors util/string.c: In function ‘argv_split’: util/string.c:171: error: implicit declaration of function ‘strndup’ util/string.c:171: error: incompatible implicit declaration of built-in function ‘strndup’ So this patch swaps the headers inclusion order. util.h defines _GNU_SOURCE, and /usr/include/features.h defines __USE_GNU as 1 if _GNU_SOURCE is defined. Signed-off-by: Hitoshi Mitake Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: <1270368798-27232-1-git-send-email-mitake@dcl.info.waseda.ac.jp> Signed-off-by: Frederic Weisbecker --- tools/perf/util/string.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c index d438924..0409fc7 100644 --- a/tools/perf/util/string.c +++ b/tools/perf/util/string.c @@ -1,5 +1,5 @@ -#include "string.h" #include "util.h" +#include "string.h" #define K 1024LL /* -- 1.6.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/