selftests/powerpc: Fix to use ucontext_t instead of struct ucontext
"Linux Kernel Mailing List" <[email protected]> Wed, 14 Feb 2018 18:19:53 +0000 (UTC)
| Newsgroups | gmane.linux.kernel.commits.head |
|---|---|
| Message-ID | <[email protected]> |
Web: https://git.kernel.org/torvalds/c/ecdf06e1ea5376bba03c155751f6869d3dfaa210 Commit: ecdf06e1ea5376bba03c155751f6869d3dfaa210 Parent: 910961754572a2f4c83ad7e610d180e3e6c29bda Refname: refs/heads/master Author: Harish <[email protected]> AuthorDate: Tue Feb 13 12:02:55 2018 +0530 Committer: Michael Ellerman <[email protected]> CommitDate: Tue Feb 13 22:44:18 2018 +1100 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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> --- tools/testing/selftests/powerpc/alignment/alignment_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; void sighandler(int sig, siginfo_t *info, void *ctx) { - struct ucontext *ucp = ctx; + ucontext_t *ucp = ctx; if (!testing) { signal(sig, SIG_DFL); -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html