Skip to content

Commit

Permalink
firefox-esr: Fix patch
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Jan 13, 2020
1 parent 6de518f commit d0c8db9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 24 deletions.
2 changes: 1 addition & 1 deletion testing/firefox/checksums
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ b5e70b12cc9dd18fffd7924a7d3a2e11574136fe0764359d08eba0755f1c5d4c mozconfig
b19aaae7fc45db643f8d2540d96919c745ea341e36d9aea2df40e3e90eb951f0 fix-toolkit.patch
e24f71a6a0d8d4637b2081780c66b01be4eeb4dd496031270d0ae0b898be94d2 fix-tools.patch
5e0fcfde375837074baad21a8ab26aa442a7940617ebd074a6b238a48f2ceb63 fix-webrtc-glibcisms.patch
800965f5071d6f84ca99382f1ffd41b0683e3e9e704acbd415923a8b2d209761 fix-bug-1261392.patch
3e415de9a028c72833aaf58f72b5bf078bffcc3478fd50754998346154016afa fix-bug-1261392.patch
1d4a8f110d34da478f5597727eda9acacebd443dd86cce5bb64f898c01feabce mallinfo.patch
38 changes: 15 additions & 23 deletions testing/firefox/patches/fix-bug-1261392.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
--- a/tools/profiler/core/platform.h 2017-05-27 11:44:06.733119794 +0000
+++ b/tools/profiler/core/platform.h 2017-05-27 11:46:16.004253520 +0000
@@ -54,10 +54,11 @@
#include <vector>
#include "StackTop.h"

-// We need a definition of gettid(), but old glibc versions don't provide a
-// wrapper for it.
diff --git a/tools/profiler/core/platform-linux-android.cpp b/tools/profiler/core/platform-linux-android.cpp
index 07857f2..92e693c 100644
--- a/tools/profiler/core/platform-linux-android.cpp
+++ b/tools/profiler/core/platform-linux-android.cpp
@@ -72,12 +72,7 @@ using namespace mozilla;
int profiler_current_process_id() { return getpid(); }

int profiler_current_thread_id() {
- // glibc doesn't provide a wrapper for gettid().
-#if defined(__GLIBC__)
+// We need a definition of gettid(), but Linux libc implementations don't
+// provide a wrapper for it (except for Bionic)
+#if defined(__linux__)
# include <unistd.h>
+#if !defined(__BIONIC__)
# include <sys/syscall.h>
# define gettid() static_cast<pid_t>(syscall(SYS_gettid))
+#endif
@@ -71,6 +72,7 @@
return (pid_t) syscall(SYS_thread_selfid);
return static_cast<int>(static_cast<pid_t>(syscall(SYS_gettid)));
-#else
- return static_cast<int>(gettid());
-#endif
}
#endif
+#endif

#ifdef XP_WIN
#include <windows.h>

void* GetStackTop(void* aGuess) { return aGuess; }

0 comments on commit d0c8db9

Please sign in to comment.