From b647c27b02fdb549537c4de9a4ab044f7bda72ba Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 26 Aug 2013 14:59:52 -0700 Subject: [PATCH] windows: fix mingw build On older mingw installations, DEVICE_TYPE isn't defined. This was redefined in windows.h, but it was done after it was already attempted to be used. This moves the #define for DEVICE_TYPE above the usage of it in windows.h to prevent compilation failures. --- src/win/winapi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/win/winapi.h b/src/win/winapi.h index 51a3eb63..b1cf0a9e 100644 --- a/src/win/winapi.h +++ b/src/win/winapi.h @@ -4104,6 +4104,10 @@ # define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x00002000 #endif +#ifndef DEVICE_TYPE +# define DEVICE_TYPE DWORD +#endif + /* from ntifs.h */ /* MinGW already has it, mingw-w64 does not. */ #if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR) @@ -4383,10 +4387,6 @@ typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION { # define SystemProcessorPerformanceInformation 8 #endif -#ifndef DEVICE_TYPE -# define DEVICE_TYPE DWORD -#endif - #ifndef FILE_DEVICE_FILE_SYSTEM # define FILE_DEVICE_FILE_SYSTEM 0x00000009 #endif