mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf tools: include basename for non-glibc systems
perf uses the glibc version of basename(), by defining _GNU_SOURCE, including string.h and not including libgen.h. The glibc version of basename is better than the POSIX version since it does not modify its argument. Android has only one version of basename which is defined in libgen.h. This version is the same as the glibc version. Error on Android: util/annotate.c: In function 'symbol__annotate_printf': util/annotate.c:503:3: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration] util/annotate.c:503:3: error: nested extern declaration of 'basename' [-Werror=nested-externs] util/annotate.c:503:14: error: assignment makes pointer from integer without a cast [-Werror] On Android libgen.h should be included to define basename. Signed-off-by: Irina Tirdea <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
0ca0c13041
commit
b771a83062
1 changed files with 3 additions and 0 deletions
|
|
@ -10,6 +10,9 @@
|
|||
#include <linux/rbtree.h>
|
||||
#include <stdio.h>
|
||||
#include <byteswap.h>
|
||||
#if defined(__BIONIC__)
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
#ifndef NO_LIBELF_SUPPORT
|
||||
#include <libelf.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue