diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-12-28 02:16:49 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-01-24 14:40:18 -0500 |
commit | eec185ab603fab3b7b5021e840cf4b282c4c7e6b (patch) | |
tree | 30eff5c93644817ea29d914809a9f526b3553915 | |
parent | a65c23420668f7112395abf9c6f22c6450567bf0 (diff) |
perf symbols: Include elf.h header regardless LIBELF_SUPPORT
The elf.h header file is used for NO_LIBELF build too so it should be
included anyway. Also remove duplicated include of the header file in
symbol-*.c. This patch fixes following build error on NO_LIBELF build:
CC tests/hists_link.o
tests/hists_link.c: In function ‘setup_fake_machine’:
tests/hists_link.c:132:8: error: ‘STB_GLOBAL’ undeclared (first use in this function)
tests/hists_link.c:132:8: note: each undeclared identifier is reported only once for each function it appears in
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1356679009-32122-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/symbol-elf.c | 3 | ||||
-rw-r--r-- | tools/perf/util/symbol-minimal.c | 1 | ||||
-rw-r--r-- | tools/perf/util/symbol.h | 2 |
3 files changed, 1 insertions, 5 deletions
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index f63557b59c06..54efcb5659ac 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c | |||
@@ -1,6 +1,3 @@ | |||
1 | #include <libelf.h> | ||
2 | #include <gelf.h> | ||
3 | #include <elf.h> | ||
4 | #include <fcntl.h> | 1 | #include <fcntl.h> |
5 | #include <stdio.h> | 2 | #include <stdio.h> |
6 | #include <errno.h> | 3 | #include <errno.h> |
diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c index 259f8f2ea9c9..a7390cde63bc 100644 --- a/tools/perf/util/symbol-minimal.c +++ b/tools/perf/util/symbol-minimal.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #include "symbol.h" | 1 | #include "symbol.h" |
2 | 2 | ||
3 | #include <elf.h> | ||
4 | #include <stdio.h> | 3 | #include <stdio.h> |
5 | #include <fcntl.h> | 4 | #include <fcntl.h> |
6 | #include <string.h> | 5 | #include <string.h> |
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index ec7b2405c377..d97377ac2f16 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -16,8 +16,8 @@ | |||
16 | #ifdef LIBELF_SUPPORT | 16 | #ifdef LIBELF_SUPPORT |
17 | #include <libelf.h> | 17 | #include <libelf.h> |
18 | #include <gelf.h> | 18 | #include <gelf.h> |
19 | #include <elf.h> | ||
20 | #endif | 19 | #endif |
20 | #include <elf.h> | ||
21 | 21 | ||
22 | #include "dso.h" | 22 | #include "dso.h" |
23 | 23 | ||