From 5978e89a6c2560a54cf16ba1b62fac5834489465 Mon Sep 17 00:00:00 2001 From: Sour Date: Sat, 22 Feb 2020 12:11:51 -0500 Subject: [PATCH] MinGW: Fixed compilation error --- Core/BsxStream.cpp | 2 +- Core/Rtc4513.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/BsxStream.cpp b/Core/BsxStream.cpp index aaff56a..b7f9f3c 100644 --- a/Core/BsxStream.cpp +++ b/Core/BsxStream.cpp @@ -217,7 +217,7 @@ void BsxStream::InitTimeStruct() { time_t dateTime = _resetDate + ((_memoryManager->GetMasterClock() - _resetMasterClock) / _console->GetMasterClockRate()); -#ifdef _MSC_VER +#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) localtime_s(&_tm, &dateTime); #else localtime_r(&dateTime, &_tm); diff --git a/Core/Rtc4513.cpp b/Core/Rtc4513.cpp index 762e2da..61fd6dc 100644 --- a/Core/Rtc4513.cpp +++ b/Core/Rtc4513.cpp @@ -95,7 +95,7 @@ void Rtc4513::UpdateTime() std::time_t newTime = system_clock::to_time_t(timePoint); std::tm newTm; -#ifdef _MSC_VER +#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) localtime_s(&newTm, &newTime); #else localtime_r(&newTime, &newTm);