summary refs log tree commit diff
path: root/tools/perf/bench
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-02-14 14:19:34 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-02-14 15:19:18 -0300
commit6aa4d8264003eb4f91fb09831ad25f059113f7b2 (patch)
tree766212b0fc91ae362db0fda2e975c37992ef8435 /tools/perf/bench
parent16cab3226fc91fd8060a3d15d1f27051a7b189fb (diff)
downloadlinux-6aa4d8264003eb4f91fb09831ad25f059113f7b2.tar.gz
perf bench numa: Make sure dprintf() is not defined
When building with clang we get this error:

  bench/numa.c:46:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined]
  #define dprintf(x...) do { if (g && g->p.show_details >= 1) printf(x); } while (0)
          ^
  /usr/include/bits/stdio2.h:145:12: note: previous definition is here
  #   define dprintf(fd, ...) \
             ^
    CC       /tmp/build/perf/tests/parse-no-sample-id-all.o
  1 error generated.

So, make sure it is undefined before using that name.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Jakub Jelen <jjelen@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-f654o2svtrutamvxt7igwz74@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/bench')
-rw-r--r--tools/perf/bench/numa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index 9e5a02d6b9a9..3083fc36282b 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -43,6 +43,7 @@
 /*
  * Debug printf:
  */
+#undef dprintf
 #define dprintf(x...) do { if (g && g->p.show_details >= 1) printf(x); } while (0)
 
 struct thread_data {