From: akallabeth Date: Mon, 25 May 2020 12:07:31 +0000 (+0200) Subject: Replaced gmtime with gmtime_r X-Git-Tag: 2.1.2^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32717ff9dbc71588882c0c4aeed4af8e5e0cae11;p=platform%2Fupstream%2Ffreerdp.git Replaced gmtime with gmtime_r (cherry picked from commit a45afe9db77a19e5a177fe1dc3e85119013f9587) --- diff --git a/winpr/libwinpr/sysinfo/sysinfo.c b/winpr/libwinpr/sysinfo/sysinfo.c index 139d654..de39e15 100644 --- a/winpr/libwinpr/sysinfo/sysinfo.c +++ b/winpr/libwinpr/sysinfo/sysinfo.c @@ -213,11 +213,12 @@ void GetNativeSystemInfo(LPSYSTEM_INFO lpSystemInfo) void GetSystemTime(LPSYSTEMTIME lpSystemTime) { time_t ct = 0; + struct tm tres; struct tm* stm = NULL; WORD wMilliseconds = 0; ct = time(NULL); wMilliseconds = (WORD)(GetTickCount() % 1000); - stm = gmtime(&ct); + stm = gmtime_r(&ct, &tres); ZeroMemory(lpSystemTime, sizeof(SYSTEMTIME)); if (stm)