Fix MinGW not supportting 'localtime_r'. (#2882)

This commit is contained in:
HyungKi Jeong 2021-04-09 23:40:41 +09:00 committed by GitHub
parent 23c243bb82
commit 0d6099b2b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -500,7 +500,9 @@ typedef unsigned long long vluint64_t; ///< 64-bit unsigned type
# define VL_STRCASECMP strcasecmp
#endif
#ifdef _MSC_VER
#ifdef __MINGW32__
# define VL_LOCALTIME_R(timep, tmp) localtime_s((tmp), (timep))
#elif defined(_MSC_VER)
# define VL_LOCALTIME_R(timep, tmp) localtime_c((tmp), (timep))
#else
# define VL_LOCALTIME_R(timep, tmp) localtime_r((timep), (tmp))