summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-05-20 19:48:45 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-06-10 23:17:29 +0200
commitc2db408d5d947cd4f3df42754a598226818c519f (patch)
tree6186711bc9c205959802cf1eeba1cd0582fcc8a1
parentd485b50813f3be6ba0c5ea74e9c7d97f0ef1f5d5 (diff)
downloadopenttd-c2db408d5d947cd4f3df42754a598226818c519f.tar.xz
Fix aa5a8fe28: [MinGW] Wrong define tested (WIN32 vs _WIN32)
-rw-r--r--src/walltime_func.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/walltime_func.h b/src/walltime_func.h
index 219a8907d..f070d8e2b 100644
--- a/src/walltime_func.h
+++ b/src/walltime_func.h
@@ -17,7 +17,7 @@ struct LocalTimeToStruct {
static inline std::tm ToTimeStruct(std::time_t time_since_epoch)
{
std::tm time = {};
-#ifdef WIN32
+#ifdef _WIN32
/* Windows has swapped the parameters around for localtime_s. */
localtime_s(&time, &time_since_epoch);
#else
@@ -32,7 +32,7 @@ struct UTCTimeToStruct {
static inline std::tm ToTimeStruct(std::time_t time_since_epoch)
{
std::tm time = {};
-#ifdef WIN32
+#ifdef _WIN32
/* Windows has swapped the parameters around for gmtime_s. */
gmtime_s(&time, &time_since_epoch);
#else