Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1170614AbdDXNFz (ORCPT ); Mon, 24 Apr 2017 09:05:55 -0400 Received: from mga01.intel.com ([192.55.52.88]:21237 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1170573AbdDXNFs (ORCPT ); Mon, 24 Apr 2017 09:05:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,244,1488873600"; d="scan'208";a="849195096" Date: Mon, 24 Apr 2017 06:05:47 -0700 From: Andi Kleen To: Tony Jones Cc: mingo@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] perf tools: Guard _GNU_SOURCE in pmu-events/jevents.c Message-ID: <20170424130547.GS4021@tassilo.jf.intel.com> References: <20170424042633.14423-1-tonyj@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170424042633.14423-1-tonyj@suse.de> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 808 Lines: 31 On Sun, Apr 23, 2017 at 09:26:32PM -0700, Tony Jones wrote: > Guard _GNU_SOURCE (as done in pt-decoder/intel-pt-decoder.c) to prevent > possible redefinition error. Who defines it? If it's always defined somewhere else it can be just removed. -Andi > > Signed-off-by: Tony Jones > --- > tools/perf/pmu-events/jevents.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c > index baa073f38334..b6300e875b87 100644 > --- a/tools/perf/pmu-events/jevents.c > +++ b/tools/perf/pmu-events/jevents.c > @@ -1,5 +1,7 @@ > #define _XOPEN_SOURCE 500 /* needed for nftw() */ > +#ifndef _GNU_SOURCE > #define _GNU_SOURCE /* needed for asprintf() */ > +#endif > > /* Parse event JSON files */ > > -- > 2.11.0 >