diff options
author | Harish <harish@linux.vnet.ibm.com> | 2018-02-13 01:32:55 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-02-13 06:44:18 -0500 |
commit | ecdf06e1ea5376bba03c155751f6869d3dfaa210 (patch) | |
tree | 12b7d9b986e3417c8158e93914aa7fb967482eaf | |
parent | 910961754572a2f4c83ad7e610d180e3e6c29bda (diff) |
selftests/powerpc: Fix to use ucontext_t instead of struct ucontext
With glibc 2.26 'struct ucontext' is removed to improve POSIX
compliance, which breaks powerpc/alignment_handler selftest. Fix the
test by using ucontext_t. Tested on ppc, works with older glibc
versions as well.
Fixes the following:
alignment_handler.c: In function ‘sighandler’:
alignment_handler.c:68:5: error: dereferencing pointer to incomplete type ‘struct ucontext’
ucp->uc_mcontext.gp_regs[PT_NIP] += 4;
Signed-off-by: Harish <harish@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | tools/testing/selftests/powerpc/alignment/alignment_handler.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/powerpc/alignment/alignment_handler.c b/tools/testing/selftests/powerpc/alignment/alignment_handler.c index 39fd362415cf..0f2698f9fd6d 100644 --- a/tools/testing/selftests/powerpc/alignment/alignment_handler.c +++ b/tools/testing/selftests/powerpc/alignment/alignment_handler.c | |||
@@ -57,7 +57,7 @@ volatile int gotsig; | |||
57 | 57 | ||
58 | void sighandler(int sig, siginfo_t *info, void *ctx) | 58 | void sighandler(int sig, siginfo_t *info, void *ctx) |
59 | { | 59 | { |
60 | struct ucontext *ucp = ctx; | 60 | ucontext_t *ucp = ctx; |
61 | 61 | ||
62 | if (!testing) { | 62 | if (!testing) { |
63 | signal(sig, SIG_DFL); | 63 | signal(sig, SIG_DFL); |