perf bench numa: Make sure dprintf() is not defined
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 6aa4d8264003eb4f91fb09831ad25f059113f7b2 Gitweb: http://git.kernel.org/tip/6aa4d8264003eb4f91fb09831ad25f059113f7b2 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Tue, 14 Feb 2017 14:19:34 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 14 Feb 2017 15:19:18 -0300
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.o1 error generated.
So, make sure it is undefined before using that name.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Hitoshi Mitake <[email protected]>
Cc Jakub Jelen <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/bench/numa.c | 1 + 1 file changed, 1 insertion(+)
tools/perf/bench/numa.c +1 -0
@@ -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 {