* [PATCH] selftests/powerpc: Fix: use ucontext_t instead of struct ucontext
@ 2018-02-13 6:32 Harish
2018-02-14 5:43 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Harish @ 2018-02-13 6:32 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Harish
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>
---
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 39fd362..0f2698f 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);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: selftests/powerpc: Fix: use ucontext_t instead of struct ucontext
2018-02-13 6:32 [PATCH] selftests/powerpc: Fix: use ucontext_t instead of struct ucontext Harish
@ 2018-02-14 5:43 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2018-02-14 5:43 UTC (permalink / raw)
To: Harish, linuxppc-dev; +Cc: Harish
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 664 bytes --]
On Tue, 2018-02-13 at 06:32:55 UTC, Harish wrote:
> 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>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/ecdf06e1ea5376bba03c155751f686
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-14 5:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-13 6:32 [PATCH] selftests/powerpc: Fix: use ucontext_t instead of struct ucontext Harish
2018-02-14 5:43 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).