patch-tools_profiler_platform-linux_cc 832 B

123456789101112131415161718192021222324252627
  1. --- mozilla-release.orig/tools/profiler/platform-linux.cc 2013-12-05 17:07:58.000000000 +0100
  2. +++ mozilla-release/tools/profiler/platform-linux.cc 2014-01-02 14:59:20.000000000 +0100
  3. @@ -58,7 +58,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. @@ -84,14 +84,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. #if !defined(ANDROID)
  24. // Keep track of when any of our threads calls fork(), so we can