[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-b771a8306205f0261496e93574a71bc7106844dc@git.kernel.org>
Date: Sat, 8 Sep 2012 04:43:39 -0700
From: tip-bot for Irina Tirdea <irina.tirdea@...el.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, paulus@...ba.org,
mingo@...hat.com, hpa@...or.com, mingo@...nel.org,
a.p.zijlstra@...llo.nl, namhyung.kim@....com, rostedt@...dmis.org,
irina.tirdea@...el.com, dsahern@...il.com, tglx@...utronix.de
Subject: [tip:perf/core] perf tools: include basename for non-glibc systems
Commit-ID: b771a8306205f0261496e93574a71bc7106844dc
Gitweb: http://git.kernel.org/tip/b771a8306205f0261496e93574a71bc7106844dc
Author: Irina Tirdea <irina.tirdea@...el.com>
AuthorDate: Sat, 8 Sep 2012 03:43:17 +0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 7 Sep 2012 22:06:53 -0300
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 <irina.tirdea@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Namhyung Kim <namhyung.kim@....com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Steven Rostedt <rostedt@...dmis.org>
Link: http://lkml.kernel.org/r/1347065004-15306-6-git-send-email-irina.tirdea@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/symbol.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index fc4b1e6..d3b330c 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -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>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists