patch-tools_profiler_platform-linux_cc 795 B

123456789101112131415161718192021222324252627
  1. --- mozilla-release.orig/tools/profiler/platform-linux.cc 2015-01-09 05:38:28.000000000 +0100
  2. +++ mozilla-release/tools/profiler/platform-linux.cc 2015-01-29 16:46:28.000000000 +0100
  3. @@ -57,7 +57,7 @@
  4. #include <fcntl.h> // open
  5. #include <unistd.h> // sysconf
  6. #include <semaphore.h>
  7. -#ifdef __GLIBC__
  8. +#if defined(__GLIBC__) && ! defined(__UCLIBC__)
  9. #include <execinfo.h> // backtrace, backtrace_symbols
  10. #endif // def __GLIBC__
  11. #include <strings.h> // index
  12. @@ -92,14 +92,12 @@
  13. #define SIGNAL_SAVE_PROFILE SIGUSR2
  14. -#if defined(__GLIBC__)
  15. -// glibc doesn't implement gettid(2).
  16. +// glibc/musl doesn't implement gettid(2).
  17. #include <sys/syscall.h>
  18. pid_t gettid()
  19. {
  20. return (pid_t) syscall(SYS_gettid);
  21. }
  22. -#endif
  23. /* static */ Thread::tid_t
  24. Thread::GetCurrentId()