summaryrefslogtreecommitdiff
path: root/package/firefox/patches/patch-tools_profiler_platform-linux_cc
blob: a331e87feb6249670f6dff3b0a206711386b5ea7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- mozilla-release.orig/tools/profiler/platform-linux.cc	2013-12-05 17:07:58.000000000 +0100
+++ mozilla-release/tools/profiler/platform-linux.cc	2014-01-02 14:59:20.000000000 +0100
@@ -58,7 +58,7 @@
 #include <fcntl.h>      // open
 #include <unistd.h>     // sysconf
 #include <semaphore.h>
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && ! defined(__UCLIBC__)
 #include <execinfo.h>   // backtrace, backtrace_symbols
 #endif  // def __GLIBC__
 #include <strings.h>    // index
@@ -84,14 +84,12 @@
 
 #define SIGNAL_SAVE_PROFILE SIGUSR2
 
-#if defined(__GLIBC__)
-// glibc doesn't implement gettid(2).
+// glibc/musl doesn't implement gettid(2).
 #include <sys/syscall.h>
 pid_t gettid()
 {
   return (pid_t) syscall(SYS_gettid);
 }
-#endif
 
 #if !defined(ANDROID)
 // Keep track of when any of our threads calls fork(), so we can