From 04b33e21866412689f18b7ad6daf0a54d8f959a7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 28 Jun 2017 13:44:52 -0700 Subject: Replace 'struct ucontext' with 'ucontext_t' type glibc used to have: typedef struct ucontext { ... } ucontext_t; glibc now has: typedef struct ucontext_t { ... } ucontext_t; (See https://sourceware.org/bugzilla/show_bug.cgi?id=21457 for detail and rationale for the glibc change) However, QEMU used "struct ucontext" in declarations. This is a private name and compatibility cannot be guaranteed. Switch to only using the standardized type name. Signed-off-by: Khem Raj Message-id: 20170628204452.41230-1-raj.khem@gmail.com Cc: Kamil Rytarowski Cc: Riku Voipio Cc: Laurent Vivier Cc: Paolo Bonzini Reviewed-by: Eric Blake [PMM: Rewrote commit message, based mostly on the one from Nathaniel McCallum] Signed-off-by: Peter Maydell --- linux-user/signal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'linux-user/signal.c') diff --git a/linux-user/signal.c b/linux-user/signal.c index d68bd26013..cc0c3fcee9 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -3346,7 +3346,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, * * a0 = signal number * a1 = pointer to siginfo_t - * a2 = pointer to struct ucontext + * a2 = pointer to ucontext_t * * $25 and PC point to the signal handler, $29 points to the * struct sigframe. @@ -3764,7 +3764,7 @@ struct target_signal_frame { struct rt_signal_frame { siginfo_t info; - struct ucontext uc; + ucontext_t uc; uint32_t tramp[2]; }; @@ -3980,7 +3980,7 @@ struct rt_signal_frame { siginfo_t *pinfo; void *puc; siginfo_t info; - struct ucontext uc; + ucontext_t uc; uint16_t retcode[4]; /* Trampoline code. */ }; @@ -4515,7 +4515,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, tswap_siginfo(&frame->info, info); } - /*err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext));*/ + /*err |= __clear_user(&frame->uc, offsetof(ucontext_t, uc_mcontext));*/ __put_user(0, &frame->uc.tuc_flags); __put_user(0, &frame->uc.tuc_link); __put_user(target_sigaltstack_used.ss_sp, @@ -5007,7 +5007,7 @@ enum { struct target_ucontext { target_ulong tuc_flags; - target_ulong tuc_link; /* struct ucontext __user * */ + target_ulong tuc_link; /* ucontext_t __user * */ struct target_sigaltstack tuc_stack; #if !defined(TARGET_PPC64) int32_t tuc_pad[7]; -- cgit 1.4.1