qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 4/9] osdep.h: Always include <sys/signal.h> if it exists


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v3 4/9] osdep.h: Always include <sys/signal.h> if it exists
Date: Fri, 3 Jul 2020 17:21:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 7/3/20 5:15 PM, Thomas Huth wrote:
> On 03/07/2020 16.56, Peter Maydell wrote:
>> From: David CARLIER <devnexen@gmail.com>
>>
>> Regularize our handling of <sys/signal.h>: currently we include it in
>> osdep.h, but only for OpenBSD, and we include it without an ifdef
>> guard in a couple of C files.  This causes problems for Haiku, which
>> doesn't have that header.
>>
>> Instead, check in configure whether sys/signal.h exists, and if it
>> does then always include it from osdep.h.
>>
>> Signed-off-by: David Carlier <devnexen@gmail.com>
>> [PMM: Expanded commit message]
>> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>>  configure                   | 8 ++++++++
>>  include/qemu/osdep.h        | 2 +-
>>  hw/xen/xen-legacy-backend.c | 1 -
>>  util/oslib-posix.c          | 1 -
>>  4 files changed, 9 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure b/configure
>> index ddc53d873ef..d131f760d8f 100755
>> --- a/configure
>> +++ b/configure
>> @@ -3212,6 +3212,11 @@ if ! check_include "ifaddrs.h" ; then
>>    have_ifaddrs_h=no
>>  fi
>>  
>> +have_sys_signal_h=no
>> +if check_include "sys/signal.h" ; then
>> +  have_sys_signal_h=yes
>> +fi
>> +
>>  ##########################################
>>  # VTE probe
>>  
>> @@ -7398,6 +7403,9 @@ fi
>>  if test "$have_broken_size_max" = "yes" ; then
>>      echo "HAVE_BROKEN_SIZE_MAX=y" >> $config_host_mak
>>  fi
>> +if test "$have_sys_signal_h" = "yes" ; then
>> +    echo "CONFIG_SYS_SIGNAL=y" >> $config_host_mak
>> +fi
> 
> I'd maybe rather name it HAVE_SYS_SIGNAL_H, but I guess that's just a
> matter of taste.

Agreed, if possible.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 
> 




reply via email to

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