summaryrefslogtreecommitdiff
path: root/src/symbolize.cc
diff options
context:
space:
mode:
authorxiaoyur347 <xiaoyur347@gmail.com>2013-12-20 09:02:49 +0800
committerxiaoyur347 <xiaoyur347@gmail.com>2013-12-20 09:02:49 +0800
commit7c4888515ed93347d4793fc066cd6048e519a197 (patch)
treeb68c4f582981dce27434682be427124aa398dd82 /src/symbolize.cc
parent7bd193bca97d93b43ff6c824bc9f39227329312f (diff)
downloadgperftools-7c4888515ed93347d4793fc066cd6048e519a197.tar.gz
add uclibc support
* some variables defined with "char *" should be modified to "const char*" * For uclibc, glibc's "void malloc_stats(void)" should be "void malloc_stats(FILE *)", is commented now. * For uclibc, __sbrk is with attribute "hidden", so we use mmap allocator for uclibc.
Diffstat (limited to 'src/symbolize.cc')
-rwxr-xr-x[-rw-r--r--]src/symbolize.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/symbolize.cc b/src/symbolize.cc
index 88568fa..3530fca 100644..100755
--- a/src/symbolize.cc
+++ b/src/symbolize.cc
@@ -76,9 +76,13 @@ static string* g_pprof_path = new string(FLAGS_symbolize_pprof);
// Returns NULL if we're on an OS where we can't get the invocation name.
// Using a static var is ok because we're not called from a thread.
-static char* GetProgramInvocationName() {
+static const char* GetProgramInvocationName() {
#if defined(HAVE_PROGRAM_INVOCATION_NAME)
+#ifdef __UCLIBC__
+ extern const char* program_invocation_name; // uclibc provides this
+#else
extern char* program_invocation_name; // gcc provides this
+#endif
return program_invocation_name;
#elif defined(__MACH__)
// We don't want to allocate memory for this since we may be