From d3d3207214768671754928648790996ed1e5425c Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 17 Jun 2023 21:35:12 -0400 Subject: [PATCH] Apply some compiler-specific hacks to resolve compiler errors - Make the existing _WIN32_WINNT redefinition contingent on MinGW - Define a typedef for EDataFlow on MSVC --- audio/common/mmdevice_common_inline.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/audio/common/mmdevice_common_inline.h b/audio/common/mmdevice_common_inline.h index 538a6e2a8b..255fdf5c9d 100644 --- a/audio/common/mmdevice_common_inline.h +++ b/audio/common/mmdevice_common_inline.h @@ -18,11 +18,19 @@ #include +/* Fix for MSYS2 increasing _WIN32_WINNT to 0x0603*/ +#if defined(__MINGW32__) || defined(__MINGW64__) #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif #define _WIN32_WINNT 0x0600 #define WIN32_LEAN_AND_MEAN +#else +typedef enum EDataFlow EDataFlow; +/* MinGW defines EDataFlow differently than MSVC does; + * this typedef smooths that over. */ +#endif + #include #include