qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/4] configure: Add a proper check for sys/ioccom.h and use i


From: Paolo Bonzini
Subject: Re: [PATCH 3/4] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h
Date: Sun, 15 Nov 2020 15:34:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 15/11/20 15:00, Thomas Huth wrote:
On 14/11/2020 17.56, 罗勇刚(Yonggang Luo) wrote:
Can we check this in meson.build?

That would be nicer, indeed, but I did not spot a place where I could add my
code there ... all the other HAVE_xxx_H symbols are added in the configure
script.

There is one similar test, it was split in two:

has_gettid = cc.has_function('gettid')
...
config_host_data.set('CONFIG_GETTID', has_gettid)

but there's no particular reason for that.  You can just add

config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_headers('sys/ioccom.h'))

in the config-host.h section of meson.build?.

Paolo

On Sun, Nov 15, 2020 at 12:53 AM Thomas Huth <thuth@redhat.com
<mailto:thuth@redhat.com>> wrote:

On Solaris and Haiku, the _IO() macros are defined in <sys/ioccom.h>.
Add a proper check for this header to our configure scripts, and
make sure to include the header in tpm_ioctl.h to fix a build failure
on Solaris and Haiku.

Signed-off-by: Thomas Huth <thuth@redhat.com <mailto:thuth@redhat.com>>

+#########################################
+# sys/ioccom.h check
+have_sys_ioccom_h=no
+if check_include "sys/ioccom.h" ; then
+  have_sys_ioccom_h=yes
+fi



Paolo




reply via email to

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