Skip to contentSkip to conversation

qga/commands-win32.c: Drop the check for _WIN32_WINNT >= 0x0601

PATCH In review Thomas Huth 3 participants 3 messages May 4, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qga/commands-win32.c: Drop the check for _WIN32_WINNT >= 0x0601

All current versions of glib require _WIN32_WINNT set to 0x0601 or higher already, and we also use this value as a minimum in our osdep.h header file, so there is no way to still compile this code with an older version of the Windows ABI. Thus we can drop this check now.

---
 qga/commands-win32.c | 2 --
 1 file changed, 2 deletions(-)
qga/commands-win32.c +0 -2
index b5fee6a2cd..d23875264f 100644
@@ -484,7 +484,6 @@ static GuestDiskBusType win2qemu[] = {
     [BusTypeSata] = GUEST_DISK_BUS_TYPE_SATA,
     [BusTypeSd] =  GUEST_DISK_BUS_TYPE_SD,
     [BusTypeMmc] = GUEST_DISK_BUS_TYPE_MMC,
-#if (_WIN32_WINNT >= 0x0601)
     [BusTypeVirtual] = GUEST_DISK_BUS_TYPE_VIRTUAL,
     [BusTypeFileBackedVirtual] = GUEST_DISK_BUS_TYPE_FILE_BACKED_VIRTUAL,
     /*
@@ -492,7 +491,6 @@ static GuestDiskBusType win2qemu[] = {
      */
     [BusTypeSpaces] = GUEST_DISK_BUS_TYPE_UNKNOWN,
     [BusTypeNvme] = GUEST_DISK_BUS_TYPE_NVME,
-#endif
 };
 
 static GuestDiskBusType find_bus_type(STORAGE_BUS_TYPE bus)
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Thomas Huth

All current versions of glib require _WIN32_WINNT set to 0x0601 or higher already, and we also use this value as a minimum in our osdep.h header file, so there is no way to still compile this code with an older version of the Windows ABI. Thus we can drop this check now.

---
 qga/commands-win32.c | 2 --
 1 file changed, 2 deletions(-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by
#2 lore raw
Quoted 26 lines · Daniel P. Berrangé
Quoted 10 lines · Thomas Huth

All current versions of glib require _WIN32_WINNT set to 0x0601 or higher already, and we also use this value as a minimum in our osdep.h header file, so there is no way to still compile this code with an older version of the Windows ABI. Thus we can drop this check now.

---
 qga/commands-win32.c | 2 --
 1 file changed, 2 deletions(-)

With regards,
Daniel
--
|: https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-
https://fstop138.berrange.com :|
|: https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|