Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbZLBIMa (ORCPT ); Wed, 2 Dec 2009 03:12:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751304AbZLBIMa (ORCPT ); Wed, 2 Dec 2009 03:12:30 -0500 Received: from mail.windriver.com ([147.11.1.11]:36887 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192AbZLBIM3 (ORCPT ); Wed, 2 Dec 2009 03:12:29 -0500 Message-ID: <4B161F3D.3040202@windriver.com> Date: Wed, 02 Dec 2009 16:03:09 +0800 From: Wang Liming User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Xiao Guangrong CC: Ingo Molnar , 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() References: <1259734306-26323-1-git-send-email-liming.wang@windriver.com> <4B161F83.6090804@cn.fujitsu.com> In-Reply-To: <4B161F83.6090804@cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Dec 2009 08:11:58.0698 (UTC) FILETIME=[1E8D5CA0:01CA7327] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1062 Lines: 39 Xiao Guangrong wrote: > > Liming Wang wrote: >> strndup is a GNU extension. So add _GNU_SOURCE macro >> to avoid compiling error. >> >> Signed-off-by: Liming Wang >> Acked-by: Frederic Weisbecker >> --- >> 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 >> #include >> + >> +#undef _GNU_SOURCE > > I think those two "#include" can be removed, > because util.h include it. Agreed. It's a better method. Liming Wang > >> #include "string.h" >> #include "util.h" >> > -- 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/