[PATCH] meson: don't check for libutil.h except on FreeBSD

Daniel P. Berrangé posted 1 patch 3 years, 7 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200925092003.2195061-1-berrange@redhat.com
meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
[PATCH] meson: don't check for libutil.h except on FreeBSD
Posted by Daniel P. Berrangé 3 years, 7 months ago
The libutil.h we are after is explicitly only something we want on
FreeBSD, we don't want to accidentally pick up this header on other
platforms as it can lead to build failures.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 4d42468a51..bc52079809 100644
--- a/meson.build
+++ b/meson.build
@@ -685,7 +685,6 @@ headers = [
   'asm/hwcap.h',
   'ifaddrs.h',
   'libtasn1.h',
-  'libutil.h',
   'linux/kvm.h',
   'linux/magic.h',
   'mntent.h',
@@ -711,6 +710,10 @@ if host_machine.system() == 'linux'
   headers += 'linux/devlink.h'
 endif
 
+if host_machine.system() == 'freebsd'
+  headers += 'libutil.h'
+endif
+
 foreach name : headers
   if cc.has_header(name)
     conf.set('WITH_@0@'.format(name.underscorify().to_upper()), 1)
-- 
2.26.2

Re: [PATCH] meson: don't check for libutil.h except on FreeBSD
Posted by Ján Tomko 3 years, 7 months ago
On a Friday in 2020, Daniel P. Berrangé wrote:
>The libutil.h we are after is explicitly only something we want on
>FreeBSD, we don't want to accidentally pick up this header on other
>platforms as it can lead to build failures.
>
>Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>---
> meson.build | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
Re: [PATCH] meson: don't check for libutil.h except on FreeBSD
Posted by Neal Gompa 3 years, 7 months ago
On Fri, Sep 25, 2020 at 5:20 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> The libutil.h we are after is explicitly only something we want on
> FreeBSD, we don't want to accidentally pick up this header on other
> platforms as it can lead to build failures.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  meson.build | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 4d42468a51..bc52079809 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -685,7 +685,6 @@ headers = [
>    'asm/hwcap.h',
>    'ifaddrs.h',
>    'libtasn1.h',
> -  'libutil.h',
>    'linux/kvm.h',
>    'linux/magic.h',
>    'mntent.h',
> @@ -711,6 +710,10 @@ if host_machine.system() == 'linux'
>    headers += 'linux/devlink.h'
>  endif
>
> +if host_machine.system() == 'freebsd'
> +  headers += 'libutil.h'
> +endif
> +
>  foreach name : headers
>    if cc.has_header(name)
>      conf.set('WITH_@0@'.format(name.underscorify().to_upper()), 1)
> --
> 2.26.2
>

Reviewed-by: Neal Gompa <ngompa13@gmail.com>

-- 
真実はいつも一つ!/ Always, there's only one truth!