diff options
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.patch | 61 |
1 files changed, 52 insertions, 9 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 index 3f9f33b487..7f0e38cb95 100644 --- 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 @@ -1,17 +1,60 @@ -From 862b807076d57f2f58ed9d572ddac8bb402774a2 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 10 Jun 2017 01:01:10 -0700 -Subject: [PATCH 2/6] context APIs are not available on musl +From 26c104adf6c5162572b7aa2fac89d0835b7f8f0b Mon Sep 17 00:00:00 2001 +From: Randy MacLeod <Randy.MacLeod@windriver.com> +Date: Tue, 16 Oct 2018 21:27:46 -0400 +Subject: [PATCH] context APIs are not available on musl -Upstream-Status: Pending +Updated patch for valgrind-3.14 Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> + +Apply same patch to drd/tests/swapcontext.c +for valgrind-3.17. + +Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=434775] + +Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> --- + drd/tests/swapcontext.c | 6 ++++++ memcheck/tests/linux/stack_changes.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) + 2 files changed, 12 insertions(+), 1 deletion(-) +diff --git a/drd/tests/swapcontext.c b/drd/tests/swapcontext.c +index 622c70bc5..5e72bb0f3 100644 +--- a/drd/tests/swapcontext.c ++++ b/drd/tests/swapcontext.c +@@ -20,6 +20,7 @@ + + #define STACKSIZE (PTHREAD_STACK_MIN + 4096) + ++#ifdef __GLIBC__ + typedef struct thread_local { + ucontext_t uc[3]; + size_t nrsw; +@@ -67,9 +68,11 @@ void *worker(void *data) + swapcontext(&tlocal->uc[0], &tlocal->uc[1]); + return NULL; + } ++#endif + + int main(int argc, char *argv[]) + { ++#ifdef __GLIBC__ + enum { NR = 32 }; + thread_local_t tlocal[NR]; + pthread_t thread[NR]; +@@ -94,6 +97,9 @@ int main(int argc, char *argv[]) + + for (i = 0; i < NR; i++) + pthread_join(thread[i], NULL); ++#else ++ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n"); ++#endif + + return 0; + } diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c -index a978fc2..ffb49c6 100644 +index 7f97b90a5..a26cb4ae6 100644 --- a/memcheck/tests/linux/stack_changes.c +++ b/memcheck/tests/linux/stack_changes.c @@ -10,6 +10,7 @@ @@ -19,7 +62,7 @@ index a978fc2..ffb49c6 100644 // checks that Valgrind notices their stack changes properly. +#ifdef __GLIBC__ - typedef struct ucontext mycontext; + typedef ucontext_t mycontext; mycontext ctx1, ctx2, oldc; @@ -51,9 +52,11 @@ int init_context(mycontext *uc) @@ -45,5 +88,5 @@ index a978fc2..ffb49c6 100644 return 0; } -- -2.13.1 +2.17.1 |