From: Arnaldo Carvalho de Melo <[email protected]> Such as CentOS5, where such define is not present in elf.h.
This file, genelf.c, wasn't being built for several systems, because it mistakenly was conditional on some DWARF features, now that it is just needing libelf, after "perf jit: Enable jitdump support without dwarf" it fails. So, as preparation for "perf jit: Enable jitdump support without dwarf", conditionally define it, if not available. Cc: Adrian Hunter <[email protected]> Cc: Anton Blanchard <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Maciej Debski <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> --- tools/perf/util/genelf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/util/genelf.c b/tools/perf/util/genelf.c index c1ef805c6a8f..8a2995ea426f 100644 --- a/tools/perf/util/genelf.c +++ b/tools/perf/util/genelf.c @@ -25,6 +25,10 @@ #include "genelf.h" #include "../util/jitdump.h" +#ifndef NT_GNU_BUILD_ID +#define NT_GNU_BUILD_ID 3 +#endif + #define JVMTI #define BUILD_ID_URANDOM /* different uuid for each run */ -- 2.7.4

