diff options
-rw-r--r-- | desktop/win32/source/setup/setup.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/desktop/win32/source/setup/setup.cpp b/desktop/win32/source/setup/setup.cpp index 673fe57c3c07..ad91bfd7ebfe 100644 --- a/desktop/win32/source/setup/setup.cpp +++ b/desktop/win32/source/setup/setup.cpp @@ -45,7 +45,31 @@ #include <locale.h> #include <msiquery.h> #include <msidefs.h> -#include "strsafe.h" + +#ifdef __MINGW32__ + +// Work around lack of strsafe library in mingw-w64, do let their +// strsafe.h provide inlines of StringCchVPrintfA etc, avoid linking +// errors in a debug build. +#ifdef __CRT__NO_INLINE +#undef __CRT__NO_INLINE +#define DID_UNDEFINE__CRT__NO_INLINE +#endif + +extern "C" { + +#endif + +#include <strsafe.h> + +#ifdef __MINGW32__ +} + +#ifdef DID_UNDEFINE__CRT__NO_INLINE +#define __CRT__NO_INLINE +#endif + +#endif #include "setup.hxx" |