[PATCH] meson: Check for stdarg.h

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

 



As it turns out, one of my previous commits in which I removed
checking for stdarg.h was too aggressive. Long story short, the
readline public headers rely on stdarg.h and what is worse, they
expect us to declare the autotools style of macro (HAVE_STDARG_H)
if the header file exists. If we don't do it then compiling virsh
on macos fails.

See 9ea3424a178 for more info.

Fixes: 85808b73846f93d656b4c81b6ebddd2dc3881bf6
Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 meson.build | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 1aad385ad1..98f7545495 100644
--- a/meson.build
+++ b/meson.build
@@ -1333,8 +1333,12 @@ if readline_dep.found()
     endif
   endif
 
-  # We need this to avoid compilation issues with modern compilers.
-  # See 9ea3424a178 for a more detailed explanation
+  # We need both of these hacks to avoid compilation issues with modern
+  # compilers. See 9ea3424a178 for a more detailed explanation.
+  if cc.has_header('stdarg.h')
+    conf.set('HAVE_STDARG_H', 1)
+  endif
+
   readline_dep = declare_dependency(
     compile_args: [ '-D_FUNCTION_DEF' ],
     dependencies: [ readline_dep ],
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux