public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Igor Lubashev <ilubashe@akamai.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Alexios Zavras <alexios.zavras@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Wei Li <liwei391@huawei.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Andi Kleen <ak@linux.intel.com>,
	linux-kernel@vger.kernel.org
Cc: Stephane Eranian <eranian@google.com>, Ian Rogers <irogers@google.com>
Subject: [PATCH 2/3] libperf: avoid redefining _GNU_SOURCE in test
Date: Thu,  5 Mar 2020 23:11:09 -0800	[thread overview]
Message-ID: <20200306071110.130202-3-irogers@google.com> (raw)
In-Reply-To: <20200306071110.130202-1-irogers@google.com>

_GNU_SOURCE needs to be globally defined to pick up features like
asprintf. Add a guard against redefinition in this test.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/lib/perf/tests/test-evlist.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/lib/perf/tests/test-evlist.c b/tools/lib/perf/tests/test-evlist.c
index 6d8ebe0c2504..5a5ff104b668 100644
--- a/tools/lib/perf/tests/test-evlist.c
+++ b/tools/lib/perf/tests/test-evlist.c
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE // needed for sched.h to get sched_[gs]etaffinity and CPU_(ZERO,SET)
+#endif
 #include <sched.h>
 #include <stdio.h>
 #include <stdarg.h>
-- 
2.25.1.481.gfbce0eb801-goog


  parent reply	other threads:[~2020-03-06  7:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06  7:11 [PATCH 0/3] perf tool: build related fixes Ian Rogers
2020-03-06  7:11 ` [PATCH 1/3] tools: fix off-by 1 relative directory includes Ian Rogers
2020-03-06  9:33   ` Jiri Olsa
2020-03-06 16:47     ` Ian Rogers
2020-03-06 20:13       ` Arnaldo Carvalho de Melo
2020-03-06 11:41   ` Arnaldo Carvalho de Melo
2020-03-07  7:36   ` [tip: perf/urgent] tools: Fix " tip-bot2 for Ian Rogers
2020-03-06  7:11 ` Ian Rogers [this message]
2020-03-06 11:38   ` [PATCH 2/3] libperf: avoid redefining _GNU_SOURCE in test Arnaldo Carvalho de Melo
2020-03-06 17:54     ` Ian Rogers
2020-03-06  7:11 ` [PATCH 3/3] tools/perf: build fixes for arch_errno_names.sh Ian Rogers
2020-03-06 11:40   ` Arnaldo Carvalho de Melo
2020-04-29 19:16     ` Ian Rogers
2020-05-14 15:04   ` Arnaldo Carvalho de Melo
2020-05-14 17:54     ` Ian Rogers
2020-05-15 13:50       ` Arnaldo Carvalho de Melo
2020-03-06  9:35 ` [PATCH 0/3] perf tool: build related fixes Jiri Olsa

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=20200306071110.130202-3-irogers@google.com \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexios.zavras@intel.com \
    --cc=eranian@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilubashe@akamai.com \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liwei391@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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