summaryrefslogtreecommitdiffstats
path: root/network/MEGAsync/fix-double-declaration-of-tgkill.patch
diff options
context:
space:
mode:
author Matteo Bernardini2020-11-07 10:39:25 +0100
committer Matteo Bernardini2020-11-07 10:39:25 +0100
commit69c0dd02dd77d45035c7458bbb3507bfd659bc47 (patch)
tree67e0545ccec095bdced5501bd94b7a7c8c6ac70a /network/MEGAsync/fix-double-declaration-of-tgkill.patch
parent47e77153bd7179d5081b4608265a62a12059e36f (diff)
downloadslackbuilds-current-20201107.1.tar.gz
20201107.1 global branch merge.current-20201107.1
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/MEGAsync/fix-double-declaration-of-tgkill.patch')
-rw-r--r--network/MEGAsync/fix-double-declaration-of-tgkill.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/network/MEGAsync/fix-double-declaration-of-tgkill.patch b/network/MEGAsync/fix-double-declaration-of-tgkill.patch
new file mode 100644
index 0000000000..beeea5d1b4
--- /dev/null
+++ b/network/MEGAsync/fix-double-declaration-of-tgkill.patch
@@ -0,0 +1,26 @@
+diff --git a/src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc b/src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc
+index 48f91682..1b7ed059 100644
+--- a/src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc
++++ b/src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc
+@@ -103,12 +103,6 @@
+ #define PR_SET_PTRACER 0x59616d61
+ #endif
+
+-// A wrapper for the tgkill syscall: send a signal to a specific thread.
+-static int tgkill(pid_t tgid, pid_t tid, int sig) {
+- return syscall(__NR_tgkill, tgid, tid, sig);
+- return 0;
+-}
+-
+ namespace google_breakpad {
+
+ namespace {
+@@ -347,7 +341,7 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) {
+ // In order to retrigger it, we have to queue a new signal by calling
+ // kill() ourselves. The special case (si_pid == 0 && sig == SIGABRT) is
+ // due to the kernel sending a SIGABRT from a user request via SysRQ.
+- if (tgkill(getpid(), syscall(__NR_gettid), sig) < 0) {
++ if (sys_tgkill(getpid(), syscall(__NR_gettid), sig) < 0) {
+ // If we failed to kill ourselves (e.g. because a sandbox disallows us
+ // to do so), we instead resort to terminating our process. This will
+ // result in an incorrect exit code.