patch-tools_profiler_platform-linux_cc 841 B

123456789101112131415161718192021222324252627
  1. --- mozilla-release.orig/tools/profiler/platform-linux.cc 2013-09-11 01:15:26.000000000 +0200
  2. +++ mozilla-release/tools/profiler/platform-linux.cc 2013-10-23 16:28:38.000000000 +0200
  3. @@ -53,7 +53,7 @@
  4. #include <sys/stat.h> // open
  5. #include <fcntl.h> // open
  6. #include <unistd.h> // sysconf
  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. @@ -73,14 +73,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