diff options
author | Jaeseung Ha <ipknhama@gmail.com> | 2017-12-27 23:33:31 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-27 23:33:31 +0900 |
commit | 49edf898a5b9a39a0d69072cc2434c4f23692908 (patch) | |
tree | d75de2d8aae79c23ebfcd4812d677dd0f1f30cf9 | |
parent | d1a30bf422397017cc039e33c05bd8ea47d0d5c9 (diff) | |
parent | f4d187a1a64232e91cf23f262c01930df0e0353a (diff) | |
download | crow-49edf898a5b9a39a0d69072cc2434c4f23692908.tar.gz crow-49edf898a5b9a39a0d69072cc2434c4f23692908.zip |
Merge pull request #274 from mwm126/mingw-gmtime_s
Use gmtime_s on MinGW
-rw-r--r-- | include/crow/http_server.h | 2 | ||||
-rw-r--r-- | include/crow/logging.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/crow/http_server.h b/include/crow/http_server.h index 6aa070e..548ea7a 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 9c8bfbb..db8f72f 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); |