From 6c24333f79ce4c5a894edc9b2e7b7dc78f081f63 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 29 Jun 2012 13:18:55 -0700 Subject: [PATCH] win: Use lower-case private definition of STORAGE_DEVICE_NUMBER Since we can't know if actually defines STORAGE_DEVICE_NUMBER, just use a private definition of the structure but with a lower-case name. Signed-off-by: H. Peter Anvin --- win/syslinux.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/win/syslinux.c b/win/syslinux.c index c0c4fb2..669450e 100644 --- a/win/syslinux.c +++ b/win/syslinux.c @@ -50,16 +50,16 @@ void error(char *msg); // The following struct should be in the ntddstor.h file, but I didn't have it. // mingw32 has , but including that file causes all kinds // of other failures. mingw64 has it in . -#if 0 /* Until we can figure out how to auto-detect this? */ -typedef struct _STORAGE_DEVICE_NUMBER { +// Thus, instead of STORAGE_DEVICE_NUMBER, use a lower-case private +// definition... +struct storage_device_number { DEVICE_TYPE DeviceType; ULONG DeviceNumber; ULONG PartitionNumber; -} STORAGE_DEVICE_NUMBER, *PSTORAGE_DEVICE_NUMBER; -#endif +}; BOOL GetStorageDeviceNumberByHandle(HANDLE handle, - const STORAGE_DEVICE_NUMBER * sdn) + const struct storage_device_number *sdn) { BOOL result = FALSE; DWORD count; @@ -447,7 +447,7 @@ map_done: /* If desired, fix the MBR */ if (opt.install_mbr || opt.activate_partition) { - STORAGE_DEVICE_NUMBER sdn; + struct storage_device_number sdn; if (GetStorageDeviceNumberByHandle(d_handle, &sdn)) { if (!FixMBR(sdn.DeviceNumber, sdn.PartitionNumber, opt.install_mbr, opt.activate_partition)) { fprintf(stderr, -- 2.7.4