Fix build issue for MinGW

Fixes #2885
This commit is contained in:
Ryan Harrison 2020-06-10 11:32:08 -04:00
parent 4fe018038f
commit 1eda5d825a

View File

@ -2055,7 +2055,7 @@ GTEST_DISABLE_MSC_DEPRECATED_PUSH_()
inline int ChDir(const char* dir) { return chdir(dir); }
#endif
inline FILE* FOpen(const char* path, const char* mode) {
#if GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
struct wchar_codecvt : public std::codecvt<wchar_t, char, std::mbstate_t> {};
std::wstring_convert<wchar_codecvt> converter;
std::wstring wide_path = converter.from_bytes(path);