summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2019-11-12 07:53:07 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2019-11-12 07:53:21 +0000
commit19ea6e50e8dfbdc76287fae73a75add53c08c391 (patch)
tree40a29cca992575bcd7ea3a7bd2ac9aa4ad73496f /dev-util/rr
parentmetadata/install-qa-check.d/08gentoo-paths: add guix (diff)
downloadgentoo-19ea6e50e8dfbdc76287fae73a75add53c08c391.tar.gz
gentoo-19ea6e50e8dfbdc76287fae73a75add53c08c391.tar.bz2
gentoo-19ea6e50e8dfbdc76287fae73a75add53c08c391.zip
dev-util/rr: tweak build for glibc-2.30, bug #699886
The build failed as: ``` tgkill.c:7:12: error: static declaration of ‘tgkill’ follows non-static declaration 7 | static int tgkill(int tgid, int tid, int sig) { | ^~~~~~ ``` Backport upstream glibc-2.30 fix as-is. Reported-by: Toralf Förster Closes: https://bugs.gentoo.org/699886 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-util/rr')
-rw-r--r--dev-util/rr/files/rr-5.2.0-tgkill-glibc-2.30.patch35
-rw-r--r--dev-util/rr/rr-5.2.0-r1.ebuild1
2 files changed, 36 insertions, 0 deletions
diff --git a/dev-util/rr/files/rr-5.2.0-tgkill-glibc-2.30.patch b/dev-util/rr/files/rr-5.2.0-tgkill-glibc-2.30.patch
new file mode 100644
index 000000000000..2a6e9daef2fb
--- /dev/null
+++ b/dev-util/rr/files/rr-5.2.0-tgkill-glibc-2.30.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/699886
+
+From 7044c5c6a8e64c737ba3cdb97187ff5c406e5162 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
+Date: Thu, 23 May 2019 23:18:26 +0200
+Subject: [PATCH] Fix build in newer glibc.
+
+Seems tgkill was added recently to glibc.
+
+build/32/tgkill.c:7:12: error: static declaration of 'tgkill' follows non-static declaration
+static int tgkill(int tgid, int tid, int sig) {
+ ^
+/usr/include/bits/signal_ext.h:29:12: note: previous declaration is here
+extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal);
+---
+ src/test/tgkill.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/src/test/tgkill.c
++++ b/src/test/tgkill.c
+@@ -4,9 +4,8 @@
+
+ static int num_signals_caught;
+
+-static int tgkill(int tgid, int tid, int sig) {
+- return syscall(SYS_tgkill, tgid, tid, sig);
+-}
++#define tgkill(tgid, tid, sig) \
++ syscall(SYS_tgkill, (int)(tgid), (int)(tid), (int)(sig))
+
+ static void sighandler(int sig) {
+ atomic_printf("Task %d got signal %d\n", sys_gettid(), sig);
+--
+2.24.0
+
diff --git a/dev-util/rr/rr-5.2.0-r1.ebuild b/dev-util/rr/rr-5.2.0-r1.ebuild
index aae1bb6569fd..b621d7b20092 100644
--- a/dev-util/rr/rr-5.2.0-r1.ebuild
+++ b/dev-util/rr/rr-5.2.0-r1.ebuild
@@ -36,6 +36,7 @@ RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${P}-ucontext_t.patch
"${FILESDIR}"/${P}-c++14.patch
+ "${FILESDIR}"/${P}-tgkill-glibc-2.30.patch
)
pkg_setup() {