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 --- user-exec.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'user-exec.c') diff --git a/user-exec.c b/user-exec.c index a8f95fa1e1..2a975eaf69 100644 --- a/user-exec.c +++ b/user-exec.c @@ -167,7 +167,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, #elif defined(__OpenBSD__) struct sigcontext *uc = puc; #else - struct ucontext *uc = puc; + ucontext_t *uc = puc; #endif unsigned long pc; int trapno; @@ -222,7 +222,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, #elif defined(__OpenBSD__) struct sigcontext *uc = puc; #else - struct ucontext *uc = puc; + ucontext_t *uc = puc; #endif pc = PC_sig(uc); @@ -289,7 +289,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ucontext_t *uc = puc; #else - struct ucontext *uc = puc; + ucontext_t *uc = puc; #endif unsigned long pc; int is_write; @@ -316,7 +316,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, void *puc) { siginfo_t *info = pinfo; - struct ucontext *uc = puc; + ucontext_t *uc = puc; uint32_t *pc = uc->uc_mcontext.sc_pc; uint32_t insn = *pc; int is_write = 0; @@ -414,7 +414,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, #if defined(__NetBSD__) ucontext_t *uc = puc; #else - struct ucontext *uc = puc; + ucontext_t *uc = puc; #endif unsigned long pc; int is_write; @@ -441,7 +441,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, int cpu_signal_handler(int host_signum, void *pinfo, void *puc) { siginfo_t *info = pinfo; - struct ucontext *uc = puc; + ucontext_t *uc = puc; uintptr_t pc = uc->uc_mcontext.pc; uint32_t insn = *(uint32_t *)pc; bool is_write; @@ -474,7 +474,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, void *puc) int cpu_signal_handler(int host_signum, void *pinfo, void *puc) { siginfo_t *info = pinfo; - struct ucontext *uc = puc; + ucontext_t *uc = puc; unsigned long ip; int is_write = 0; @@ -505,7 +505,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, void *puc) { siginfo_t *info = pinfo; - struct ucontext *uc = puc; + ucontext_t *uc = puc; unsigned long pc; uint16_t *pinsn; int is_write = 0; @@ -558,7 +558,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, void *puc) { siginfo_t *info = pinfo; - struct ucontext *uc = puc; + ucontext_t *uc = puc; greg_t pc = uc->uc_mcontext.pc; int is_write; -- cgit v1.2.3