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/host/aarch64/hostdep.h | 2 +- linux-user/host/arm/hostdep.h | 2 +- linux-user/host/i386/hostdep.h | 2 +- linux-user/host/ppc64/hostdep.h | 2 +- linux-user/host/s390x/hostdep.h | 2 +- linux-user/host/x86_64/hostdep.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'linux-user/host') diff --git a/linux-user/host/aarch64/hostdep.h b/linux-user/host/aarch64/hostdep.h index 64f75ce..a8d41a2 100644 --- a/linux-user/host/aarch64/hostdep.h +++ b/linux-user/host/aarch64/hostdep.h @@ -24,7 +24,7 @@ extern char safe_syscall_end[]; /* Adjust the signal context to rewind out of safe-syscall if we're in it */ static inline void rewind_if_in_safe_syscall(void *puc) { - struct ucontext *uc = puc; + ucontext_t *uc = puc; __u64 *pcreg = &uc->uc_mcontext.pc; if (*pcreg > (uintptr_t)safe_syscall_start diff --git a/linux-user/host/arm/hostdep.h b/linux-user/host/arm/hostdep.h index 5c1ae60..9276fe6 100644 --- a/linux-user/host/arm/hostdep.h +++ b/linux-user/host/arm/hostdep.h @@ -24,7 +24,7 @@ extern char safe_syscall_end[]; /* Adjust the signal context to rewind out of safe-syscall if we're in it */ static inline void rewind_if_in_safe_syscall(void *puc) { - struct ucontext *uc = puc; + ucontext_t *uc = puc; unsigned long *pcreg = &uc->uc_mcontext.arm_pc; if (*pcreg > (uintptr_t)safe_syscall_start diff --git a/linux-user/host/i386/hostdep.h b/linux-user/host/i386/hostdep.h index d834bd8..073be74 100644 --- a/linux-user/host/i386/hostdep.h +++ b/linux-user/host/i386/hostdep.h @@ -24,7 +24,7 @@ extern char safe_syscall_end[]; /* Adjust the signal context to rewind out of safe-syscall if we're in it */ static inline void rewind_if_in_safe_syscall(void *puc) { - struct ucontext *uc = puc; + ucontext_t *uc = puc; greg_t *pcreg = &uc->uc_mcontext.gregs[REG_EIP]; if (*pcreg > (uintptr_t)safe_syscall_start diff --git a/linux-user/host/ppc64/hostdep.h b/linux-user/host/ppc64/hostdep.h index 0b0f5f7..98979ad 100644 --- a/linux-user/host/ppc64/hostdep.h +++ b/linux-user/host/ppc64/hostdep.h @@ -24,7 +24,7 @@ extern char safe_syscall_end[]; /* Adjust the signal context to rewind out of safe-syscall if we're in it */ static inline void rewind_if_in_safe_syscall(void *puc) { - struct ucontext *uc = puc; + ucontext_t *uc = puc; unsigned long *pcreg = &uc->uc_mcontext.gp_regs[PT_NIP]; if (*pcreg > (uintptr_t)safe_syscall_start diff --git a/linux-user/host/s390x/hostdep.h b/linux-user/host/s390x/hostdep.h index 6f9da9c..4f0171f 100644 --- a/linux-user/host/s390x/hostdep.h +++ b/linux-user/host/s390x/hostdep.h @@ -24,7 +24,7 @@ extern char safe_syscall_end[]; /* Adjust the signal context to rewind out of safe-syscall if we're in it */ static inline void rewind_if_in_safe_syscall(void *puc) { - struct ucontext *uc = puc; + ucontext_t *uc = puc; unsigned long *pcreg = &uc->uc_mcontext.psw.addr; if (*pcreg > (uintptr_t)safe_syscall_start diff --git a/linux-user/host/x86_64/hostdep.h b/linux-user/host/x86_64/hostdep.h index 3b42596..a4fefb5 100644 --- a/linux-user/host/x86_64/hostdep.h +++ b/linux-user/host/x86_64/hostdep.h @@ -24,7 +24,7 @@ extern char safe_syscall_end[]; /* Adjust the signal context to rewind out of safe-syscall if we're in it */ static inline void rewind_if_in_safe_syscall(void *puc) { - struct ucontext *uc = puc; + ucontext_t *uc = puc; greg_t *pcreg = &uc->uc_mcontext.gregs[REG_RIP]; if (*pcreg > (uintptr_t)safe_syscall_start -- cgit v1.1