From 2c269eb6332bc1dd29047851ae1efc3cd4c260d2 Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Wed, 17 Mar 2021 13:32:45 +0400 Subject: [PATCH] Fixed compilation under MinGW - use gmtime_s() instead of gmtime_r(). --- src/catch2/reporters/catch_reporter_junit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp index cff5d7d7..3b788f46 100644 --- a/src/catch2/reporters/catch_reporter_junit.cpp +++ b/src/catch2/reporters/catch_reporter_junit.cpp @@ -26,7 +26,7 @@ namespace Catch { std::time(&rawtime); std::tm timeInfo = {}; -#ifdef _MSC_VER +#if defined (_MSC_VER) || defined (__MINGW32__) gmtime_s(&timeInfo, &rawtime); #else gmtime_r(&rawtime, &timeInfo);