Evil: fix compilation when MSVC is not available.

localtime_s is not defined in msvcrt.dll but rather is defined in
Microsoft libc when Visual Studio or other stuff is installed.

Issue introduced in:024812c1a76286991f292c3191936778ec219ff8

Fixes T2681

@fix
This commit is contained in:
Vincent Torri 2015-08-21 12:44:44 +02:00 committed by Tom Hacohen
parent 2472dfdb24
commit c73ccef4a7
1 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,9 @@
struct tm *
evil_localtime_r(const time_t *timep, struct tm *result)
{
localtime_s(result, timep);
__time64_t t = *timep;
_localtime64_s(result, &t);
return result;
}