diff mbox

Use siginfo_t instead of struct siginfo.

Message ID hoobmx4sur.fsf@byrd.suse.de
State New
Headers show

Commit Message

Andreas Jaeger July 30, 2012, 7:21 a.m. UTC
glibc 2.16 does not export the undocumented struct siginfo anymore.
qemu uses already in most cases siginfo_t, this patch fixes the last
three occurences.

Signed-off-by: Andreas Jaeger <ajsuse.de>
---
 linux-user/signal.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Alexander Graf July 30, 2012, 9:30 p.m. UTC | #1
On 30.07.2012, at 09:21, Andreas Jaeger wrote:

> 
> glibc 2.16 does not export the undocumented struct siginfo anymore.
> qemu uses already in most cases siginfo_t, this patch fixes the last
> three occurences.
> 
> Signed-off-by: Andreas Jaeger <ajsuse.de>

That email address doesn't look valid :).

So I take it that the change is backwards compatible? Riku, Mike, Andreas, could we queue this for the respective stable branches when it gets it please?


Alex

> ---
> linux-user/signal.c |    6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/linux-user/signal.c b/linux-user/signal.c
> index 97f30d9..a859a45 100644
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -3255,7 +3255,7 @@ struct target_signal_frame {
> };
> 
> struct rt_signal_frame {
> -    struct siginfo info;
> +    siginfo_t info;
>     struct ucontext uc;
>     uint32_t tramp[2];
> };
> @@ -3474,9 +3474,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. */
> };
> -- 
> 1.7.10.4
> 
> 
> -- 
> Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
>  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
>   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
>    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
>
Andreas Färber July 30, 2012, 9:33 p.m. UTC | #2
Am 30.07.2012 23:30, schrieb Alexander Graf:
> 
> On 30.07.2012, at 09:21, Andreas Jaeger wrote:
> 
>>
>> glibc 2.16 does not export the undocumented struct siginfo anymore.
>> qemu uses already in most cases siginfo_t, this patch fixes the last
>> three occurences.
>>
>> Signed-off-by: Andreas Jaeger <ajsuse.de>
> 
> That email address doesn't look valid :).
> 
> So I take it that the change is backwards compatible? Riku, Mike, Andreas, could we queue this for the respective stable branches when it gets it please?

Wasn't there already another patch doing the same thing a few weeks ago?

Andreas

> 
> 
> Alex
> 
>> ---
>> linux-user/signal.c |    6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/linux-user/signal.c b/linux-user/signal.c
>> index 97f30d9..a859a45 100644
>> --- a/linux-user/signal.c
>> +++ b/linux-user/signal.c
>> @@ -3255,7 +3255,7 @@ struct target_signal_frame {
>> };
>>
>> struct rt_signal_frame {
>> -    struct siginfo info;
>> +    siginfo_t info;
>>     struct ucontext uc;
>>     uint32_t tramp[2];
>> };
>> @@ -3474,9 +3474,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. */
>> };
>> -- 
>> 1.7.10.4
>>
>>
>> -- 
>> Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
>>  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
>>   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
>>    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
>>
>
Peter Maydell July 30, 2012, 9:38 p.m. UTC | #3
On 30 July 2012 22:33, Andreas Färber <afaerber@suse.de> wrote:
> Am 30.07.2012 23:30, schrieb Alexander Graf:
>> On 30.07.2012, at 09:21, Andreas Jaeger wrote:
>>> glibc 2.16 does not export the undocumented struct siginfo anymore.
>>> qemu uses already in most cases siginfo_t, this patch fixes the last
>>> three occurences.

> Wasn't there already another patch doing the same thing a few weeks ago?

Yes: http://patchwork.ozlabs.org/patch/169170/

(It's also more complete than this patch, which misses one
occurrence in user-exec.c and one comment in linux-user/signal.c.)

-- PMM
Alexander Graf July 30, 2012, 9:41 p.m. UTC | #4
On 30.07.2012, at 23:38, Peter Maydell wrote:

> On 30 July 2012 22:33, Andreas Färber <afaerber@suse.de> wrote:
>> Am 30.07.2012 23:30, schrieb Alexander Graf:
>>> On 30.07.2012, at 09:21, Andreas Jaeger wrote:
>>>> glibc 2.16 does not export the undocumented struct siginfo anymore.
>>>> qemu uses already in most cases siginfo_t, this patch fixes the last
>>>> three occurences.
> 
>> Wasn't there already another patch doing the same thing a few weeks ago?
> 
> Yes: http://patchwork.ozlabs.org/patch/169170/
> 
> (It's also more complete than this patch, which misses one
> occurrence in user-exec.c and one comment in linux-user/signal.c.)

Ah, cool. Same thing I said before applies to this patch then. I'm fairly sure people want to be able to compile older QEMU on newer glibc.


Alex
Andreas Jaeger July 31, 2012, 7:07 a.m. UTC | #5
On Monday, July 30, 2012 22:38:32 Peter Maydell wrote:
> On 30 July 2012 22:33, Andreas Färber <afaerber@suse.de> wrote:
> > Am 30.07.2012 23:30, schrieb Alexander Graf:
> >> On 30.07.2012, at 09:21, Andreas Jaeger wrote:
> >>> glibc 2.16 does not export the undocumented struct siginfo
> >>> anymore.
> >>> qemu uses already in most cases siginfo_t, this patch fixes the
> >>> last
> >>> three occurences.
> > 
> > Wasn't there already another patch doing the same thing a few weeks
> > ago?
> Yes: http://patchwork.ozlabs.org/patch/169170/
> 
> (It's also more complete than this patch, which misses one
> occurrence in user-exec.c and one comment in linux-user/signal.c.)

Yes, let's apply that patch instead of mine,

Andreas
diff mbox

Patch

diff --git a/linux-user/signal.c b/linux-user/signal.c
index 97f30d9..a859a45 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -3255,7 +3255,7 @@  struct target_signal_frame {
 };
 
 struct rt_signal_frame {
-    struct siginfo info;
+    siginfo_t info;
     struct ucontext uc;
     uint32_t tramp[2];
 };
@@ -3474,9 +3474,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. */
 };