linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Brendan Gregg <brendan.d.gregg@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	He Kuang <hekuang@huawei.com>, Li Zefan <lizefan@huawei.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Wang Nan <wangnan0@huawei.com>, Will Deacon <will.deacon@arm.com>,
	pi3orama@163.com
Subject: [PATCH 13/13] perf tests: Fix build on older systems where 'signal' is reserved
Date: Mon, 15 Feb 2016 18:01:43 -0300	[thread overview]
Message-ID: <1455570103-29211-14-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1455570103-29211-1-git-send-email-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

fixing the following problems, for instance, on RHEL6.7:

    CC       /tmp/build/perf/tests/bp_signal.o
  cc1: warnings being treated as errors
  tests/bp_signal.c: In function ‘__event’:
  tests/bp_signal.c:106: error: declaration of ‘signal’ shadows a global declaration
  /usr/include/signal.h:101: error: shadowed declaration is here
  tests/bp_signal.c: In function ‘bp_event’:
  tests/bp_signal.c:144: error: declaration of ‘signal’ shadows a global declaration
  /usr/include/signal.h:101: error: shadowed declaration is here
  tests/bp_signal.c: In function ‘wp_event’:
  tests/bp_signal.c:149: error: declaration of ‘signal’ shadows a global declaration
  /usr/include/signal.h:101: error: shadowed declaration is here
  mv: cannot stat `/tmp/build/perf/tests/.bp_signal.o.tmp': No such file or directory
  make[3]: *** [/tmp/build/perf/tests/bp_signal.o] Error 1
  make[2]: *** [tests] Error 2
  make[1]: *** [/tmp/build/perf/perf-in.o] Error 2
  make[1]: *** Waiting for unfinished jobs....

Reported-by: Vinson Lee <vlee@freedesktop.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: He Kuang <hekuang@huawei.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: pi3orama@163.com
Fixes: 8fd34e1cce18 ("perf test: Improve bp_signal")
Link: http://lkml.kernel.org/n/tip-wlpx6tik1b0jirlkw64bv400@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/bp_signal.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c
index 1d1bb489b4e8..e7664fe3bd33 100644
--- a/tools/perf/tests/bp_signal.c
+++ b/tools/perf/tests/bp_signal.c
@@ -103,7 +103,7 @@ static void sig_handler(int signum __maybe_unused,
 	}
 }
 
-static int __event(bool is_x, void *addr, int signal)
+static int __event(bool is_x, void *addr, int sig)
 {
 	struct perf_event_attr pe;
 	int fd;
@@ -133,7 +133,7 @@ static int __event(bool is_x, void *addr, int signal)
 	}
 
 	fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC);
-	fcntl(fd, F_SETSIG, signal);
+	fcntl(fd, F_SETSIG, sig);
 	fcntl(fd, F_SETOWN, getpid());
 
 	ioctl(fd, PERF_EVENT_IOC_RESET, 0);
@@ -141,14 +141,14 @@ static int __event(bool is_x, void *addr, int signal)
 	return fd;
 }
 
-static int bp_event(void *addr, int signal)
+static int bp_event(void *addr, int sig)
 {
-	return __event(true, addr, signal);
+	return __event(true, addr, sig);
 }
 
-static int wp_event(void *addr, int signal)
+static int wp_event(void *addr, int sig)
 {
-	return __event(false, addr, signal);
+	return __event(false, addr, sig);
 }
 
 static long long bp_count(int fd)
-- 
2.5.0

  parent reply	other threads:[~2016-02-15 21:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15 21:01 [GIT PULL 00/13] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 01/13] perf config: Add '--system' and '--user' options to select which config file is used Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 02/13] perf symbols: Fix symbols searching for module in buildid-cache Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 03/13] perf build: Add EXTRA_LDFLAGS option to makefile Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 04/13] perf python scripting: Append examples to err msg about audit-libs-python Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 05/13] perf tools: Add comment explaining the repsep_snprintf function Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 06/13] perf hists: Do column alignment on the format iterator Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 07/13] perf tools: Unlink entries from terms list Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 08/13] perf tools: Introduce parse_events_terms__purge() Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 09/13] perf tools: Use perf_event_terms__purge() for non-malloced terms Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 10/13] perf tools: Free the terms list_head in parse_events__free_terms() Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 11/13] perf tools: Rename parse_events__free_terms() to parse_events_terms__delete() Arnaldo Carvalho de Melo
2016-02-15 21:01 ` [PATCH 12/13] perf data: Fix releasing event_class Arnaldo Carvalho de Melo
2016-02-15 21:01 ` Arnaldo Carvalho de Melo [this message]
2016-02-16  7:48 ` [GIT PULL 00/13] perf/core improvements and fixes Ingo Molnar

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=1455570103-29211-14-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=ast@kernel.org \
    --cc=brendan.d.gregg@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=hekuang@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.com \
    --cc=will.deacon@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).