]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
selftests/powerpc: Fix to use ucontext_t instead of struct ucontext
authorHarish <harish@linux.vnet.ibm.com>
Tue, 14 May 2019 06:57:00 +0000 (08:57 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 24 Jun 2019 14:21:33 +0000 (16:21 +0200)
commit41c5aa46bfc9107ce1ec959985cc51e161299814
tree93fffe6ba5ad816e8b53a1cbd37e922485162c0e
parenta775be87c9cb249f5b566811428e8df846799a1d
selftests/powerpc: Fix to use ucontext_t instead of struct ucontext

BugLink: https://bugs.launchpad.net/bugs/1828935
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>
(cherry picked from commit ecdf06e1ea5376bba03c155751f6869d3dfaa210)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
tools/testing/selftests/powerpc/alignment/alignment_handler.c