render / rpms / qemu

Forked from rpms/qemu 5 months ago
Clone

Blame 0001-Replace-struct-siginfo-with-siginfo_t.patch

d97997
From baf954154e7c0acda038c01a5c28aea4db7eec67 Mon Sep 17 00:00:00 2001
d97997
From: "Richard W.M. Jones" <rjones@redhat.com>
d97997
Date: Thu, 5 Jul 2012 14:28:03 +0100
d97997
Subject: [PATCH] Replace 'struct siginfo' with 'siginfo_t'.
d97997
d97997
glibc 2.16 will remove the undocumented definition of 'struct siginfo'
d97997
from <bits/siginfo.h>.
d97997
d97997
This change is already present in glibc 2.15.90, so qemu compilation
d97997
of certain targets (eg. cris-user) breaks.
d97997
d97997
This struct was always typedef'd to be the same as 'siginfo_t' which
d97997
is what POSIX documents, so use that instead.
d97997
d97997
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
d97997
---
d97997
 linux-user/signal.c |    8 ++++----
d97997
 user-exec.c         |    2 +-
d97997
 2 files changed, 5 insertions(+), 5 deletions(-)
d97997
d97997
diff --git a/linux-user/signal.c b/linux-user/signal.c
d97997
index 43346dc..108dff9 100644
d97997
--- a/linux-user/signal.c
d97997
+++ b/linux-user/signal.c
d97997
@@ -2849,7 +2849,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
d97997
     * Arguments to signal handler:
d97997
     *
d97997
     *   a0 = signal number
d97997
-    *   a1 = pointer to struct siginfo
d97997
+    *   a1 = pointer to siginfo_t
d97997
     *   a2 = pointer to struct ucontext
d97997
     *
d97997
     * $25 and PC point to the signal handler, $29 points to the
d97997
@@ -3255,7 +3255,7 @@ struct target_signal_frame {
d97997
 };
d97997
 
d97997
 struct rt_signal_frame {
d97997
-    struct siginfo info;
d97997
+    siginfo_t info;
d97997
     struct ucontext uc;
d97997
     uint32_t tramp[2];
d97997
 };
d97997
@@ -3474,9 +3474,9 @@ struct target_signal_frame {
d97997
 };
d97997
 
d97997
 struct rt_signal_frame {
d97997
-        struct siginfo *pinfo;
d97997
+        siginfo_t *pinfo;
d97997
         void *puc;
d97997
-        struct siginfo info;
d97997
+        siginfo_t info;
d97997
         struct ucontext uc;
d97997
         uint8_t retcode[8];       /* Trampoline code. */
d97997
 };
d97997
diff --git a/user-exec.c b/user-exec.c
d97997
index b2a4261..1a9c276 100644
d97997
--- a/user-exec.c
d97997
+++ b/user-exec.c
d97997
@@ -588,7 +588,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
d97997
 int cpu_signal_handler(int host_signum, void *pinfo,
d97997
                        void *puc)
d97997
 {
d97997
-    struct siginfo *info = pinfo;
d97997
+    siginfo_t *info = pinfo;
d97997
     struct ucontext *uc = puc;
d97997
     unsigned long pc = uc->uc_mcontext.sc_iaoq[0];
d97997
     uint32_t insn = *(uint32_t *)pc;
d97997
-- 
d97997
1.7.10.4
d97997