mdbx: partial fix MSVC level-4 warnings.

This commit is contained in:
Leonid Yuriev
2017-06-05 22:46:15 +03:00
committed by Leo Yuriev
parent 90b30e7584
commit 318646794e
3 changed files with 12 additions and 10 deletions

View File

@@ -97,10 +97,10 @@ bool output(const logging::loglevel priority, const char *format, va_list ap) {
chrono::time now = chrono::now_realtime();
struct tm tm;
time_t time = now.utc;
#ifdef _MSC_VER
int rc = _localtime32_s(&tm, (const __time32_t *)&now.utc);
#else
time_t time = now.utc;
int rc = localtime_r(&time, &tm) ? MDBX_SUCCESS : errno;
#endif
if (rc != MDBX_SUCCESS)