9ec5e4de9d
- add compatibility patch for glibc 2.16 (Thanks AJ!) OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=97
70 lines
2.2 KiB
Diff
70 lines
2.2 KiB
Diff
From 3ff16f3f6b220d13caeb068a865c82675da802ba Mon Sep 17 00:00:00 2001
|
|
From: Richard W.M. Jones <rjones@redhat.com>
|
|
Date: Thu, 5 Jul 2012 03:32:44 +0000
|
|
Subject: [PATCH] Replace 'struct siginfo' with 'siginfo_t'.
|
|
|
|
glibc 2.16 will remove the undocumented definition of 'struct siginfo'
|
|
from <bits/siginfo.h>.
|
|
|
|
This change is already present in glibc 2.15.90, so qemu compilation
|
|
of certain targets (eg. cris-user) breaks.
|
|
|
|
This struct was always typedef'd to be the same as 'siginfo_t' which
|
|
is what POSIX documents, so use that instead.
|
|
|
|
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
|
|
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
|
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
|
---
|
|
linux-user/signal.c | 8 ++++----
|
|
user-exec.c | 2 +-
|
|
2 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/linux-user/signal.c b/linux-user/signal.c
|
|
index c00cf75..f33ea70 100644
|
|
--- a/linux-user/signal.c
|
|
+++ b/linux-user/signal.c
|
|
@@ -2877,7 +2877,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
|
|
* Arguments to signal handler:
|
|
*
|
|
* a0 = signal number
|
|
- * a1 = pointer to struct siginfo
|
|
+ * a1 = pointer to siginfo_t
|
|
* a2 = pointer to struct ucontext
|
|
*
|
|
* $25 and PC point to the signal handler, $29 points to the
|
|
@@ -3283,7 +3283,7 @@ struct target_signal_frame {
|
|
};
|
|
|
|
struct rt_signal_frame {
|
|
- struct siginfo info;
|
|
+ siginfo_t info;
|
|
struct ucontext uc;
|
|
uint32_t tramp[2];
|
|
};
|
|
@@ -3502,9 +3502,9 @@ struct target_signal_frame {
|
|
};
|
|
|
|
struct rt_signal_frame {
|
|
- struct siginfo *pinfo;
|
|
+ siginfo_t *pinfo;
|
|
void *puc;
|
|
- struct siginfo info;
|
|
+ siginfo_t info;
|
|
struct ucontext uc;
|
|
uint8_t retcode[8]; /* Trampoline code. */
|
|
};
|
|
diff --git a/user-exec.c b/user-exec.c
|
|
index cc57bde..2d7f6c9 100644
|
|
--- a/user-exec.c
|
|
+++ b/user-exec.c
|
|
@@ -599,7 +599,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
|
|
int cpu_signal_handler(int host_signum, void *pinfo,
|
|
void *puc)
|
|
{
|
|
- struct siginfo *info = pinfo;
|
|
+ siginfo_t *info = pinfo;
|
|
struct ucontext *uc = puc;
|
|
unsigned long pc = uc->uc_mcontext.sc_iaoq[0];
|
|
uint32_t insn = *(uint32_t *)pc;
|