diff --git a/src/core/file_sys/errors.h b/src/core/file_sys/errors.h index fea0593c72..9dae4aa43a 100644 --- a/src/core/file_sys/errors.h +++ b/src/core/file_sys/errors.h @@ -17,6 +17,15 @@ enum { }; } +// When using mingw precompiled headers, it pulls in some dark corners of the stdlib that defines +// these as macros +#ifdef ERROR_PATH_NOT_FOUND +#undef ERROR_PATH_NOT_FOUND +#endif +#ifdef ERROR_FILE_NOT_FOUND +#undef ERROR_FILE_NOT_FOUND +#endif + constexpr ResultCode ERROR_PATH_NOT_FOUND(ErrorModule::FS, ErrCodes::NotFound); // TODO(bunnei): Replace these with correct errors for Switch OS diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index 2172c681b2..e92d206730 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp @@ -13,6 +13,12 @@ #include "core/hle/service/time/interface.h" #include "core/hle/service/time/time.h" +// When using mingw precompiled headers, it pulls in some dark corners of the stdlib that defines +// GetCurrentTime as a macro +#ifdef GetCurrentTime +#undef GetCurrentTime +#endif + namespace Service::Time { class ISystemClock final : public ServiceFramework { diff --git a/src/core/loader/linker.cpp b/src/core/loader/linker.cpp index 57ca8c3eeb..517cd1f94e 100644 --- a/src/core/loader/linker.cpp +++ b/src/core/loader/linker.cpp @@ -12,6 +12,11 @@ namespace Loader { +// When using mingw precompiled headers, it pulls in some dark corners of the stdlib that defines +// RELATIVE as a macro +#ifdef RELATIVE +#undef RELATIVE +#endif enum class RelocationType : u32 { ABS64 = 257, GLOB_DAT = 1025, JUMP_SLOT = 1026, RELATIVE = 1027 }; enum DynamicType : u32 {