Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Fixed compilation under MinGW - use gmtime_s() instead of gmtime_r().

Commit
2c269eb6332bc1dd29047851ae1efc3cd4c260d2
Author
Alexander Shaduri ·
Committer
Martin Hořeňovský
Parents
4b5812e93205

Files · Download .tar.gz

Changes

 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);