summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/strace/strace-4.7/strace-eglibc-2.16.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/strace/strace-4.7/strace-eglibc-2.16.patch')
-rw-r--r--meta/recipes-devtools/strace/strace-4.7/strace-eglibc-2.16.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/strace/strace-4.7/strace-eglibc-2.16.patch b/meta/recipes-devtools/strace/strace-4.7/strace-eglibc-2.16.patch
new file mode 100644
index 0000000000..67cf4e8c11
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace-4.7/strace-eglibc-2.16.patch
@@ -0,0 +1,52 @@
1Upstream-Status: Backport
2
3https://bugs.gentoo.org/414637
4
5From 302e8ec6cd62912a3cd6494ce6702f4ad8dae0e2 Mon Sep 17 00:00:00 2001
6From: Mike Frysinger <vapier@gentoo.org>
7Date: Fri, 4 May 2012 19:30:59 -0400
8Subject: [PATCH] util: fix building when glibc has a stub process_vm_readv
9
10If you have a newer glibc which provides process_vm_readv, but it is built
11against older kernel headers which lack __NR_process_vm_readv, the library
12will contain a stub implementation that just returns ENOSYS. Autoconf
13checks for this case explicitly and will declare it as unavailable. So we
14end up in a case where the headers provide the prototype, but autoconf has
15not defined HAVE_PROCESS_VM_READV, so we hit the same build failure again:
16
17util.c:738:16: error: static declaration of 'process_vm_readv' follows non-static declaration
18/usr/include/bits/uio.h:58:16: note: previous declaration of 'process_vm_readv' was here
19
20So rename our local function to something unique, and add a define so the
21callers all hit the right place.
22
23* util.c (strace_process_vm_readv): Rename from process_vm_readv.
24(process_vm_readv): Define to strace_process_vm_readv.
25
26Signed-off-by: Mike Frysinger <vapier@gentoo.org>
27---
28 util.c | 4 +++-
29 1 file changed, 3 insertions(+), 1 deletion(-)
30
31Index: strace-4.7/util.c
32===================================================================
33--- strace-4.7.orig/util.c 2012-04-28 05:58:35.000000000 -0700
34+++ strace-4.7/util.c 2012-07-11 11:07:47.869825001 -0700
35@@ -735,7 +735,8 @@
36
37 #if defined(__NR_process_vm_readv)
38 static bool process_vm_readv_not_supported = 0;
39-static ssize_t process_vm_readv(pid_t pid,
40+/* Have to avoid duplicating with the C library headers. */
41+static ssize_t strace_process_vm_readv(pid_t pid,
42 const struct iovec *lvec,
43 unsigned long liovcnt,
44 const struct iovec *rvec,
45@@ -744,6 +745,7 @@
46 {
47 return syscall(__NR_process_vm_readv, (long)pid, lvec, liovcnt, rvec, riovcnt, flags);
48 }
49+#define process_vm_readv strace_process_vm_readv
50 #else
51 static bool process_vm_readv_not_supported = 1;
52 # define process_vm_readv(...) (errno = ENOSYS, -1)