From: Michal Privoznik Date: Mon, 12 Dec 2022 11:46:41 +0000 (+0100) Subject: meson: Provide default values for nonexistent xenlight pkgconfig vars X-Git-Tag: v9.0.0-rc1~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03a25597f19cfd8e0e00aaa0cfd45940c916f896;p=thirdparty%2Flibvirt.git meson: Provide default values for nonexistent xenlight pkgconfig vars It may happen that xenlight pkgconfig file does not contain 'xenfirmwaredir' and/or 'libexec_bin' variables, which is okay and we have code that deals with this situation. But that code is executed when the queried value is an empty string. This may not always be the case and we should specifically set 'default_value' so that the empty string is returned if pkgconfig variable doesn't exist. Fixes: 968479adcfa5c49b29b7b6680dcaffde1408f044 Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- diff --git a/meson.build b/meson.build index e48e63ef01..1a13148c51 100644 --- a/meson.build +++ b/meson.build @@ -1433,8 +1433,8 @@ if not get_option('driver_libxl').disabled() and conf.has('WITH_LIBVIRTD') libxl_dep = dependency('xenlight', version: '>=' + libxl_version, required: get_option('driver_libxl')) if libxl_dep.found() - libxl_firmware_dir = libxl_dep.get_variable(pkgconfig : 'xenfirmwaredir') - libxl_execbin = libxl_dep.get_variable(pkgconfig : 'libexec_bin') + libxl_firmware_dir = libxl_dep.get_variable(pkgconfig : 'xenfirmwaredir', default_value: '') + libxl_execbin = libxl_dep.get_variable(pkgconfig : 'libexec_bin', default_value: '') if libxl_firmware_dir != '' conf.set_quoted('LIBXL_FIRMWARE_DIR', libxl_firmware_dir) endif