linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>
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	[thread overview]
Message-ID: <1270391804-6552-5-git-send-regression-fweisbec@gmail.com> (raw)
In-Reply-To: <1270391804-6552-1-git-send-regression-fweisbec@gmail.com>

From: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>

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 <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1270368798-27232-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 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


  parent reply	other threads:[~2010-04-04 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-04 14:36 [GIT PULL] perf updates Frederic Weisbecker
2010-04-04 14:36 ` [PATCH 1/4] perf: Drop the frame reliablity check Frederic Weisbecker
2010-04-04 14:36 ` [PATCH 2/4] perf: Fetch hot regs from the template caller Frederic Weisbecker
2010-04-04 14:36 ` [PATCH 3/4] perf_event: Make perf fd non seekable Frederic Weisbecker
2010-04-04 14:36 ` Frederic Weisbecker [this message]
2010-04-04 14:42 ` [GIT PULL] perf updates Frederic Weisbecker
2010-04-04 19:02   ` Ingo Molnar
2010-04-05  9:56   ` Hitoshi Mitake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1270391804-6552-5-git-send-regression-fweisbec@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mitake@dcl.info.waseda.ac.jp \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).