aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-02-02 10:19:04 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2022-02-21 10:35:54 +0100
commitb7e4ab15c37424aac14a3492662fa26364269eb4 (patch)
tree270b6335cce1f899431b6e58457c706d70a393a4 /meson.build
parente23460ce921168b4172af83043e87ca9bd85e43b (diff)
meson, configure: move ntddscsi API check to meson
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build18
1 files changed, 17 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 8d9898c5c3..aefe8681b9 100644
--- a/meson.build
+++ b/meson.build
@@ -1938,6 +1938,22 @@ if targetos == 'windows' and link_language == 'cpp'
int main(void) { return VSS_CTX_BACKUP; }''')
endif
+have_ntddscsi = false
+if targetos == 'windows'
+ have_ntddscsi = cc.compiles('''
+ #include <windows.h>
+ #include <ntddscsi.h>
+ int main(void) {
+ #if !defined(IOCTL_SCSI_GET_ADDRESS)
+ #error Missing required ioctl definitions
+ #endif
+ SCSI_ADDRESS addr = { .Lun = 0, .TargetId = 0, .PathId = 0 };
+ return addr.Lun;
+ }
+''')
+endif
+config_host_data.set('HAVE_NTDDSCSI', have_ntddscsi)
+
ignored = ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target
'HAVE_GDB_BIN']
arrays = ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
@@ -3605,7 +3621,7 @@ summary_info += {'libnfs support': libnfs}
if targetos == 'windows'
if have_ga
summary_info += {'QGA VSS support': have_qga_vss}
- summary_info += {'QGA w32 disk info': config_host.has_key('CONFIG_QGA_NTDDSCSI')}
+ summary_info += {'QGA w32 disk info': have_ntddscsi}
endif
endif
summary_info += {'seccomp support': seccomp}