mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tony Jones <tonyj@suse.de>
To: mingo@kernel.org
Cc: Tony Jones <tonyj@suse.de>, Andi Kleen <ak@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] perf tools: Guard _GNU_SOURCE in pmu-events/jevents.c
Date: Sun, 23 Apr 2017 21:26:32 -0700	[thread overview]
Message-ID: <20170424042633.14423-1-tonyj@suse.de> (raw)

Guard _GNU_SOURCE (as done in pt-decoder/intel-pt-decoder.c) to prevent 
possible redefinition error.

Signed-off-by: Tony Jones <tonyj@suse.de>
---
 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

             reply	other threads:[~2017-04-24  4:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24  4:26 Tony Jones [this message]
2017-04-24  4:26 ` [PATCH 2/2] perf tools: Add NULL end elements to 'unit_to_pmu' map Tony Jones
2017-04-24 13:05 ` [PATCH 1/2] perf tools: Guard _GNU_SOURCE in pmu-events/jevents.c Andi Kleen
2017-04-24 15:45   ` Tony Jones

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=20170424042633.14423-1-tonyj@suse.de \
    --to=tonyj@suse.de \
    --cc=ak@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.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

all inboxes | Powered by JetHome®