blob: b3033621b5c7a54d30c5a4f1356137d0dd5fb013 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From 230cd84486145c5bb1d69d4c9a544e00adbcc9b5 Mon Sep 17 00:00:00 2001
Brad Bishop6e60e8b2018-02-01 10:27:11 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 1 Jul 2017 13:21:21 -0700
4Subject: [PATCH] Use ucontext_t instead of struct ucontext
5
6Newer glibc has dropped the ucontext tag from exposing
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
Brad Bishop316dfdd2018-06-25 12:45:53 -04009
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010---
11 src/stacktrace_powerpc-linux-inl.h | 3 +--
12 1 file changed, 1 insertion(+), 2 deletions(-)
13
14diff --git a/src/stacktrace_powerpc-linux-inl.h b/src/stacktrace_powerpc-linux-inl.h
Brad Bishop316dfdd2018-06-25 12:45:53 -040015index 3b3843b..a301a46 100644
Brad Bishop6e60e8b2018-02-01 10:27:11 -050016--- a/src/stacktrace_powerpc-linux-inl.h
17+++ b/src/stacktrace_powerpc-linux-inl.h
18@@ -53,7 +53,6 @@
19 #elif defined(HAVE_UCONTEXT_H)
20 #include <ucontext.h> // for ucontext_t
21 #endif
22-typedef ucontext ucontext_t;
23
24 // PowerPC64 Little Endian follows BE wrt. backchain, condition register,
25 // and LR save area, so no need to adjust the reading struct.
26@@ -202,7 +201,7 @@ static int GET_STACK_TRACE_OR_FRAMES {
27 struct rt_signal_frame_32 {
28 char dummy[64 + 16];
29 siginfo_t info;
30- struct ucontext uc;
31+ ucontext_t uc;
32 // We don't care about the rest, since IP value is at 'uc' field.A
33 } *sigframe = reinterpret_cast<rt_signal_frame_32*>(current);
34 result[n] = (void*) sigframe->uc.uc_mcontext.uc_regs->gregs[PT_NIP];