Advertisement
Guest User

glibc-gettid-wrapper.patch

a guest
Nov 23rd, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. --- a/tools/profiler/core/platform.h 2017-04-10 19:13:25.000000000 -0700
  2. +++ b/tools/profiler/core/platform.h 2019-11-23 13:26:09.765046334 -0800
  3. @@ -59,16 +59,13 @@
  4. #include <vector>
  5. #include "StackTop.h"
  6.  
  7. -// We need a definition of gettid(), but Linux libc implementations don't
  8. +// We need a definition of gettid(), but old Linux libc implementations don't
  9. // provide a wrapper for it (except for Bionic)
  10. #if defined(__linux__)
  11. #include <unistd.h>
  12. #if !defined(__BIONIC__)
  13. #include <sys/syscall.h>
  14. -static inline pid_t gettid()
  15. -{
  16. - return (pid_t) syscall(SYS_gettid);
  17. -}
  18. +#define gettid() static_cast<pid_t>(syscall(SYS_gettid))
  19. #endif
  20. #endif
  21.  
  22. --- a/tools/profiler/core/GeckoSampler.cpp 2017-04-10 19:13:25.000000000 -0700
  23. +++ b/tools/profiler/core/GeckoSampler.cpp 2019-11-23 14:17:39.549385223 -0800
  24. @@ -67,7 +67,7 @@
  25.  
  26. #if defined(LINUX) || defined(XP_MACOSX)
  27. #include <sys/types.h>
  28. -pid_t gettid();
  29. +//pid_t gettid();
  30. #endif
  31.  
  32. #if defined(__arm__) && defined(ANDROID)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement