mirror of
https://github.com/monero-project/monero.git
synced 2025-07-28 15:44:16 -04:00
Merge pull request #4880
96e6b439
blockchain_stats: don't use gmtime_r on Windows (moneromooo-monero)
This commit is contained in:
commit
d4a0fb2b89
4 changed files with 13 additions and 12 deletions
|
@ -122,6 +122,15 @@ namespace misc_utils
|
|||
return boost::lexical_cast<std::string>(GetCurrentThreadId());
|
||||
#elif defined(__GNUC__)
|
||||
return boost::lexical_cast<std::string>(pthread_self());
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool get_gmt_time(time_t t, struct tm &tm)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return gmtime_s(&tm, &t);
|
||||
#else
|
||||
return gmtime_r(&t, &tm);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue