From: Arnaldo Carvalho de Melo Date: Tue, 14 Feb 2017 17:19:34 +0000 (-0300) Subject: perf bench numa: Make sure dprintf() is not defined X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=6aa4d8264003eb4f91fb09831ad25f059113f7b2;p=openwrt%2Fstaging%2Fblogic.git 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 Cc: David Ahern Cc: Davidlohr Bueso Cc: Hitoshi Mitake Cc: Jakub Jelen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-f654o2svtrutamvxt7igwz74@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 {