--- mozilla-release.orig/tools/profiler/platform-linux.cc	2015-01-09 05:38:28.000000000 +0100
+++ mozilla-release/tools/profiler/platform-linux.cc	2015-01-29 16:46:28.000000000 +0100
@@ -57,7 +57,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
@@ -92,14 +92,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
 
 /* static */ Thread::tid_t
 Thread::GetCurrentId()
