summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD8
-rw-r--r--fix-double-declaration-of-tgkill.patch26
-rw-r--r--remove-static-tgkill.patch17
4 files changed, 33 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a6a59a37d9c6..670991c3a53a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = megasync
pkgdesc = Easy automated syncing between your computers and your MEGA cloud drive
pkgver = 4.2.5
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/meganz/MEGAsync
arch = i686
arch = x86_64
@@ -24,10 +24,10 @@ pkgbase = megasync
optdepends = sni-qt: fix systray issue on KDE and LXQt
source = git+https://github.com/meganz/MEGAsync.git#tag=v4.2.5.0_Linux
source = meganz-sdk::git+https://github.com/meganz/sdk.git
- source = remove-static-tgkill.patch
+ source = fix-double-declaration-of-tgkill.patch
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = 1d100f2517f4dc2b3af38eaa4f52ffbe9fb348833384ae0befa3ec3caaac1786
+ sha256sums = a4ee87777bc055bc98dc9b044734d24e0ec17124389fedcf45e6a67cfe2fb061
pkgname = megasync
diff --git a/PKGBUILD b/PKGBUILD
index 6843180640a8..a0aa15af69e9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgname=megasync
pkgver=4.2.5
-pkgrel=3
+pkgrel=4
pkgdesc="Easy automated syncing between your computers and your MEGA cloud drive"
arch=('i686' 'x86_64')
url="https://github.com/meganz/MEGAsync"
@@ -19,10 +19,10 @@ optdepends=('sni-qt: fix systray issue on KDE and LXQt')
_extname=".0_Linux"
source=("git+https://github.com/meganz/MEGAsync.git#tag=v${pkgver}${_extname}"
"meganz-sdk::git+https://github.com/meganz/sdk.git"
- "remove-static-tgkill.patch")
+ "fix-double-declaration-of-tgkill.patch")
sha256sums=('SKIP'
'SKIP'
- '1d100f2517f4dc2b3af38eaa4f52ffbe9fb348833384ae0befa3ec3caaac1786')
+ 'a4ee87777bc055bc98dc9b044734d24e0ec17124389fedcf45e6a67cfe2fb061')
prepare() {
cd "MEGAsync"
@@ -30,7 +30,7 @@ prepare() {
git config submodule.src/MEGASync/mega.url "../meganz-sdk"
git submodule update
- patch -Np1 -i "../remove-static-tgkill.patch"
+ patch -Np1 -i "../fix-double-declaration-of-tgkill.patch"
}
build() {
diff --git a/fix-double-declaration-of-tgkill.patch b/fix-double-declaration-of-tgkill.patch
new file mode 100644
index 000000000000..beeea5d1b413
--- /dev/null
+++ b/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.
diff --git a/remove-static-tgkill.patch b/remove-static-tgkill.patch
deleted file mode 100644
index 9ae43a56f76d..000000000000
--- a/remove-static-tgkill.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-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..d40de082 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 {