build-sys: drop ntddscsi.h check
PATCH 1/1 build-sys: drop ntddscsi.h check
From: Marc-André Lureau <[email protected]>
The header has been part of MinGW-w64 since the introduction of the project (2007). While on MinGW(32), the legacy project, it was imported in 2014 from w32api-3.17 (commit e4803e0da2).
According to build-platform.rst and our CI coverage, we only support building with MinGW-w64 (from Debian/Fedora).
--- meson.build | 17 ----------------- qga/commands-win32.c | 19 ------------------- qga/meson.build | 6 ++---- 3 files changed, 2 insertions(+), 40 deletions(-)
meson.build +0 -17
@@ -2019,22 +2019,6 @@ if targetos == 'windows' and link_language == 'cpp' endif config_host_data.set('HAVE_VSS_SDK', have_vss_sdk) -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']
@@ -3722,7 +3706,6 @@ 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': have_ntddscsi} endif endif summary_info += {'seccomp support': seccomp}
qga/commands-win32.c +0 -19
@@ -18,10 +18,8 @@#include <ws2tcpip.h> #include <iptypes.h> #include <iphlpapi.h> -#ifdef HAVE_NTDDSCSI #include <winioctl.h> #include <ntddscsi.h> -#endif #include <setupapi.h> #include <cfgmgr32.h> #include <initguid.h>
@@ -474,8 +472,6 @@ void qmp_guest_file_flush(int64_t handle, Error **errp) } } -#ifdef HAVE_NTDDSCSI -static GuestDiskBusType win2qemu[] = { [BusTypeUnknown] =GUEST_DISK_BUS_TYPE_UNKNOWN , [BusTypeScsi] =GUEST_DISK_BUS_TYPE_SCSI ,
@@ -1098,21 +1094,6 @@ GuestDiskInfoList *qmp_guest_get_disks(Error **errp)return ret; } -#else - -static GuestDiskAddressList *build_guest_disk_info (char *guid,Error **errp) -{ -return NULL ; -} - -GuestDiskInfoList *qmp_guest_get_disks (Error **errp) -{ -error_setg (errp,QERR_UNSUPPORTED ); -return NULL ; -} - -#endif /* HAVE_NTDDSCSI */ -static GuestFilesystemInfo *build_guest_fsinfo (char *guid,Error **errp) {DWORD info_size;
qga/meson.build +2 -4
@@ -83,14 +83,12 @@ qga_ss = qga_ss.apply(config_host, strict: false) gen_tlb = [] qga_libs = [] if targetos == 'windows' - qga_libs += ['-lws2_32', '-lwinmm', '-lpowrprof', '-lwtsapi32', '-lwininet', '-liphlpapi', '-lnetapi32'] + qga_libs += ['-lws2_32', '-lwinmm', '-lpowrprof', '-lwtsapi32', '-lwininet', '-liphlpapi', '-lnetapi32', + '-lsetupapi', '-lcfgmgr32'] if have_qga_vss qga_libs += ['-lole32', '-loleaut32', '-lshlwapi', '-lstdc++', '-Wl,--enable-stdcall-fixup'] subdir('vss-win32') endif - if have_ntddscsi - qga_libs += ['-lsetupapi', '-lcfgmgr32'] - endif endif qga = executable('qemu-ga', qga_ss.sources(),
Signature · 1 line
2.35.1.693.g805e0a68082a
Quoted 126 lines · On Fri, Apr 1, 2022 at 11:51 AM <[email protected]> wrote:
From: Marc-André Lureau <[email protected]>
The header has been part of MinGW-w64 since the introduction of the project (2007). While on MinGW(32), the legacy project, it was imported in 2014 from w32api-3.17 (commit
e4803e0da2).According to
build-platform.rstand our CI coverage, we only support building with MinGW-w64 (from Debian/Fedora).Signed-off-by Marc-André Lureau <[email protected]>--- meson.build | 17 ----------------- qga/commands-win32.c | 19 ------------------- qga/meson.build | 6 ++---- 3 files changed, 2 insertions(+), 40 deletions(-)meson.build +0
-17@@ -2019,22 +2019,6 @@ if targetos == 'windows' and link_language == 'cpp' endif config_host_data.set('HAVE_VSS_SDK', have_vss_sdk) -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']@@ -3722,7 +3706,6 @@ 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': have_ntddscsi} endif endif summary_info += {'seccomp support': seccomp}qga/commands-win32.c +0
-19@@ -18,10 +18,8 @@#include <ws2tcpip.h> #include <iptypes.h> #include <iphlpapi.h> -#ifdef HAVE_NTDDSCSI #include <winioctl.h> #include <ntddscsi.h> -#endif #include <setupapi.h> #include <cfgmgr32.h> #include <initguid.h> @@ -474,8 +472,6 @@ void qmp_guest_file_flush(int64_t handle, Error **errp) } } -#ifdef HAVE_NTDDSCSI -static GuestDiskBusType win2qemu[] = { [BusTypeUnknown] =GUEST_DISK_BUS_TYPE_UNKNOWN , [BusTypeScsi] =GUEST_DISK_BUS_TYPE_SCSI ,@@ -1098,21 +1094,6 @@ GuestDiskInfoList *qmp_guest_get_disks(Error **errp)return ret; } -#else - -static GuestDiskAddressList *build_guest_disk_info (char *guid,Error **errp) -{ -return NULL ; -} - -GuestDiskInfoList *qmp_guest_get_disks (Error **errp) -{ -error_setg (errp,QERR_UNSUPPORTED ); -return NULL ; -} - -#endif /* HAVE_NTDDSCSI */ -static GuestFilesystemInfo *build_guest_fsinfo (char *guid,Error **errp) {DWORD info_size;qga/meson.build +0
-1@@ -83,14 +83,12 @@ qga_ss = qga_ss.apply(config_host, strict: false) gen_tlb = [] qga_libs = [] if targetos == 'windows' - qga_libs += ['-lws2_32', '-lwinmm', '-lpowrprof', '-lwtsapi32','-lwininet', '-liphlpapi', '-lnetapi32']
+qga_libs+= ['-lws2_32', '-lwinmm', '-lpowrprof', '-lwtsapi32', '-lwininet', '-liphlpapi', '-lnetapi32',
+ '-lsetupapi', '-lcfgmgr32']
ifhave_qga_vssqga_libs += ['-lole32', '-loleaut32', '-lshlwapi', '-lstdc++', '-Wl,--enable-stdcall-fixup'] subdir('vss-win32')endif
qga/meson.build +0
-4- if have_ntddscsi - qga_libs += ['-lsetupapi', '-lcfgmgr32'] - endif endif qga = executable('qemu-ga', qga_ss.sources(), --2.35.1.693.g805e0a68082a
Paolo Bonzini
AppliedQueued, thanks.
Paolo