1
0
Fork 0

perf symbols: Fix mismatched declarations for elf_getphdrnum

When HAVE_ELF_GETPHDRNUM_SUPPORT is false we trip on this problem:

    CC       /tmp/build/perf/util/symbol-elf.o
  util/symbol-elf.c:41:12: error: static declaration of ‘elf_getphdrnum’ follows non-static declaration
   static int elf_getphdrnum(Elf *elf, size_t *dst)
            ^
  In file included from util/symbol.h:19:0,
                   from util/symbol-elf.c:8:
  /usr/include/libelf.h:206:12: note: previous declaration of ‘elf_getphdrnum’ was here
   extern int elf_getphdrnum (Elf *__elf, size_t *__dst);
            ^
    MKDIR    /tmp/build/perf/bench/
  /home/git/linux/tools/build/Makefile.build:68: recipe for target '/tmp/build/perf/util/symbol-elf.o' failed
  make[3]: *** [/tmp/build/perf/util/symbol-elf.o] Error 1

Fix it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-qcmekyfedmov4sxr0wahcikr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
hifive-unleashed-5.1
Arnaldo Carvalho de Melo 2015-07-28 12:01:33 -03:00
parent 58b32c1b53
commit f785f23576
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ static inline char *bfd_demangle(void __maybe_unused *v,
#endif
#ifndef HAVE_ELF_GETPHDRNUM_SUPPORT
static int elf_getphdrnum(Elf *elf, size_t *dst)
int elf_getphdrnum(Elf *elf, size_t *dst)
{
GElf_Ehdr gehdr;
GElf_Ehdr *ehdr;