public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: Liming Wang <liming.wang@windriver.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	mhiramat@redhat.com, fweisbec@gmail.com, peterz@infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH]  perf tools: Add _GNU_SOURCE macro for strndup()
Date: Wed, 02 Dec 2009 16:04:19 +0800	[thread overview]
Message-ID: <4B161F83.6090804@cn.fujitsu.com> (raw)
In-Reply-To: <1259734306-26323-1-git-send-email-liming.wang@windriver.com>



Liming Wang wrote:
> strndup is a GNU extension. So add _GNU_SOURCE macro
> to avoid compiling error.
> 
> Signed-off-by: Liming Wang <liming.wang@windriver.com>
> Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
> ---
>  tools/perf/util/string.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c
> index 0977cf4..ea3eb39 100644
> --- a/tools/perf/util/string.c
> +++ b/tools/perf/util/string.c
> @@ -1,5 +1,8 @@
> +#define _GNU_SOURCE
>  #include <string.h>
>  #include <stdlib.h>
> +
> +#undef _GNU_SOURCE

I think those two "#include" can be removed,
because util.h include it.

>  #include "string.h"
>  #include "util.h"
>  

  reply	other threads:[~2009-12-02  8:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02  6:11 [PATCH] perf tools: Add _GNU_SOURCE macro for strndup() Liming Wang
2009-12-02  8:04 ` Xiao Guangrong [this message]
2009-12-02  8:03   ` Wang Liming
2009-12-02  8:30 ` [tip:perf/core] perf tools: Fix _GNU_SOURCE macro related strndup() build error tip-bot for Liming Wang

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=4B161F83.6090804@cn.fujitsu.com \
    --to=xiaoguangrong@cn.fujitsu.com \
    --cc=fweisbec@gmail.com \
    --cc=liming.wang@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.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