summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
new file mode 100644
index 0000000000..3f9f33b487
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
@@ -0,0 +1,49 @@
1From 862b807076d57f2f58ed9d572ddac8bb402774a2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 10 Jun 2017 01:01:10 -0700
4Subject: [PATCH 2/6] context APIs are not available on musl
5
6Upstream-Status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 memcheck/tests/linux/stack_changes.c | 7 ++++++-
11 1 file changed, 6 insertions(+), 1 deletion(-)
12
13diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
14index a978fc2..ffb49c6 100644
15--- a/memcheck/tests/linux/stack_changes.c
16+++ b/memcheck/tests/linux/stack_changes.c
17@@ -10,6 +10,7 @@
18 // This test is checking the libc context calls (setcontext, etc.) and
19 // checks that Valgrind notices their stack changes properly.
20
21+#ifdef __GLIBC__
22 typedef struct ucontext mycontext;
23
24 mycontext ctx1, ctx2, oldc;
25@@ -51,9 +52,11 @@ int init_context(mycontext *uc)
26
27 return ret;
28 }
29+#endif
30
31 int main(int argc, char **argv)
32 {
33+#ifdef __GLIBC__
34 int c1 = init_context(&ctx1);
35 int c2 = init_context(&ctx2);
36
37@@ -66,6 +69,8 @@ int main(int argc, char **argv)
38 //free(ctx1.uc_stack.ss_sp);
39 VALGRIND_STACK_DEREGISTER(c2);
40 //free(ctx2.uc_stack.ss_sp);
41-
42+#else
43+ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n");
44+#endif
45 return 0;
46 }
47--
482.13.1
49