blob: 5bd0b6fa4ffb2086cdeac6145883c4a615d5a964 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001From 12ac0dc6742e1bcdfaf1842186c9002f0820a5e8 Mon Sep 17 00:00:00 2001
2From: 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>
9---
10 src/stacktrace_powerpc-linux-inl.h | 3 +--
11 1 file changed, 1 insertion(+), 2 deletions(-)
12
13diff --git a/src/stacktrace_powerpc-linux-inl.h b/src/stacktrace_powerpc-linux-inl.h
14index a9bf775..47ff2d7 100644
15--- a/src/stacktrace_powerpc-linux-inl.h
16+++ b/src/stacktrace_powerpc-linux-inl.h
17@@ -53,7 +53,6 @@
18 #elif defined(HAVE_UCONTEXT_H)
19 #include <ucontext.h> // for ucontext_t
20 #endif
21-typedef ucontext ucontext_t;
22
23 // PowerPC64 Little Endian follows BE wrt. backchain, condition register,
24 // and LR save area, so no need to adjust the reading struct.
25@@ -202,7 +201,7 @@ static int GET_STACK_TRACE_OR_FRAMES {
26 struct rt_signal_frame_32 {
27 char dummy[64 + 16];
28 siginfo_t info;
29- struct ucontext uc;
30+ ucontext_t uc;
31 // We don't care about the rest, since IP value is at 'uc' field.A
32 } *sigframe = reinterpret_cast<rt_signal_frame_32*>(current);
33 result[n] = (void*) sigframe->uc.uc_mcontext.uc_regs->gregs[PT_NIP];
34--
352.13.2
36