diff --git a/include/crow/http_server.h b/include/crow/http_server.h index 6aa070e46..548ea7a30 100644 --- a/include/crow/http_server.h +++ b/include/crow/http_server.h @@ -82,7 +82,7 @@ namespace crow auto last_time_t = time(0); tm my_tm; -#ifdef _MSC_VER +#if defined(_MSC_VER) or defined(__MINGW32__) gmtime_s(&my_tm, &last_time_t); #else gmtime_r(&last_time_t, &my_tm); diff --git a/include/crow/logging.h b/include/crow/logging.h index 9c8bfbbd3..db8f72f93 100644 --- a/include/crow/logging.h +++ b/include/crow/logging.h @@ -51,7 +51,7 @@ namespace crow tm my_tm; -#ifdef _MSC_VER +#if defined(_MSC_VER) or defined(__MINGW32__) gmtime_s(&my_tm, &t); #else gmtime_r(&t, &my_tm);