At least on ARM unw_context_t and ucontext_t are not the same types, so
use unw_context_t.
See also commit 24112f6d9b87554fe18b1ca0f939f30c76ac38fa ("Fix some test
failures on x86_64 on distros with small default stacks.")
Gtest-trace.c: In function 'do_backtrace':
Gtest-trace.c:66:3: warning: initialization from incompatible pointer type
[enabled by default]
Gtest-trace.c:67:3: warning: passing argument 2 of '_Uarm_init_local' from
incompatible pointer type [enabled by default]
../include/libunwind-common.h:239:1: note: expected 'struct unw_context_t *'
but argument is of type 'struct ucontext_t *'
Gtest-bt.c: In function 'do_backtrace':
Gtest-bt.c:65:3: warning: initialization from incompatible pointer type
[enabled by default]
Gtest-bt.c:66:3: warning: passing argument 2 of '_Uarm_init_local' from
incompatible pointer type [enabled by default]
../include/libunwind-common.h:239:1: note: expected 'struct unw_context_t *'
but argument is of type 'struct ucontext_t *'
---
tests/Gtest-bt.c | 2 +-
tests/Gtest-trace.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/Gtest-bt.c b/tests/Gtest-bt.c
index fb5b396..b5f4439 100644
--- a/tests/Gtest-bt.c
+++ b/tests/Gtest-bt.c
@@ -50,7 +50,7 @@ int num_errors;
* cause the signal stack to overflow */
char buf[512], name[256];
unw_cursor_t cursor;
-ucontext_t uc;
+unw_context_t uc;
static void
do_backtrace (void)
diff --git a/tests/Gtest-trace.c b/tests/Gtest-trace.c
index ed34e58..7488ee6 100644
--- a/tests/Gtest-trace.c
+++ b/tests/Gtest-trace.c
@@ -50,7 +50,7 @@ int num_errors;
char buf[512], name[256];
void *addresses[3][128];
unw_cursor_t cursor;
-ucontext_t uc;
+unw_context_t uc;
static void
do_backtrace (void)
--
1.7.9.5
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel