qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 06/17] cpus: remove ugly cast on sigbus_handler


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL 06/17] cpus: remove ugly cast on sigbus_handler
Date: Fri, 17 Mar 2017 16:20:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0


On 17/03/2017 16:08, Peter Maydell wrote:
> On 27 February 2017 at 16:49, Paolo Bonzini <address@hidden> wrote:
>> The cast is there because sigbus_handler is invoked via sigfd_handler.
>> But it feels just wrong to use struct qemu_signalfd_siginfo in the
>> prototype of a function that is passed to sigaction.
>>
>> Instead, do a simple-minded conversion of qemu_signalfd_siginfo to
>> siginfo_t.
>>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> +    } else if (info->ssi_signo == SIGIO) {
>> +        si.si_band = info->ssi_band;
>> +    }
> 
> This doesn't build on OpenBSD:
> 
> In file included from /usr/include/sys/signal.h:107:0,
>                  from /usr/include/signal.h:38,
>                  from /root/qemu/include/qemu/osdep.h:86,
>                  from /root/qemu/util/oslib-posix.c:29:
> /root/qemu/util/oslib-posix.c: In function 'sigaction_invoke':
> /root/qemu/util/oslib-posix.c:713:12: error: 'union <anonymous>' has
> no member named '_file'
>          si.si_band = info->ssi_band;
>             ^
> 
> I dunno how much we care.

It's marked as obsolescent in POSIX, so it is sane to remove it.  I'll
send a patch.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]