]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: Fix to use ucontext_t instead of struct ucontext
authorHarish <harish@linux.vnet.ibm.com>
Tue, 13 Feb 2018 06:32:55 +0000 (12:02 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 13 Feb 2018 11:44:18 +0000 (22:44 +1100)
commit3a5996fb34ec6d0976c4e50ed95f0895c0fbd5b6
tree12b7d9b986e3417c8158e93914aa7fb967482eaf
parent629ccf5f19e25f663fafacf36c9d9e3a0dd810d7
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>
tools/testing/selftests/powerpc/alignment/alignment_handler.c