Fix MinGW compile

Also see https://groups.google.com/d/msg/cryptopp-users/fVLk79sIBEE/Euhu6x9nAQAJ
This commit is contained in:
Jeffrey Walton 2020-01-27 02:13:22 -05:00
parent cc23a39fb9
commit b706548e6c
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

View File

@ -212,6 +212,9 @@ inline std::string TimeToString(const time_t& t)
CRYPTOPP_ASSERT(err == 0);
std::string str(err == 0 ? timeBuf : "");
#elif defined(__MINGW32__) || defined(__MINGW64__)
char* timeString = ::asctime(::localtime(&t));
std::string str(timeString ? timeString : "");
#elif (_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || defined(_POSIX_SOURCE))
tm localTime;
char timeBuf[64];