Skip to content

Commit 6aa4d82

Browse files
committed
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 <[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]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 16cab32 commit 6aa4d82

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/bench/numa.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
/*
4444
* Debug printf:
4545
*/
46+
#undef dprintf
4647
#define dprintf(x...) do { if (g && g->p.show_details >= 1) printf(x); } while (0)
4748

4849
struct thread_data {

0 commit comments

Comments
 (0)