Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From 230cd84486145c5bb1d69d4c9a544e00adbcc9b5 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 1 Jul 2017 13:21:21 -0700 |
| 4 | Subject: [PATCH] Use ucontext_t instead of struct ucontext |
| 5 | |
| 6 | Newer glibc has dropped the ucontext tag from exposing |
| 7 | |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 9 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 10 | --- |
| 11 | src/stacktrace_powerpc-linux-inl.h | 3 +-- |
| 12 | 1 file changed, 1 insertion(+), 2 deletions(-) |
| 13 | |
| 14 | diff --git a/src/stacktrace_powerpc-linux-inl.h b/src/stacktrace_powerpc-linux-inl.h |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 15 | index 3b3843b..a301a46 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 16 | --- 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]; |