summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent dot torri at gmail dot com>2015-08-21 12:44:44 +0200
committerTom Hacohen <tom@stosb.com>2015-08-21 13:12:32 +0100
commitc73ccef4a753bc29e3d6589a38d1e65f462183fd (patch)
treec4838336d8f7d250850fac3119b6f5320075414f
parent2472dfdb240731084ba65ce3075da5548af1c459 (diff)
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
-rw-r--r--src/lib/evil/evil_time.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/evil/evil_time.c b/src/lib/evil/evil_time.c
index 1c06ecb250..a6984bf85c 100644
--- a/src/lib/evil/evil_time.c
+++ b/src/lib/evil/evil_time.c
@@ -13,7 +13,9 @@
13struct tm * 13struct tm *
14evil_localtime_r(const time_t *timep, struct tm *result) 14evil_localtime_r(const time_t *timep, struct tm *result)
15{ 15{
16 localtime_s(result, timep); 16 __time64_t t = *timep;
17
18 _localtime64_s(result, &t);
17 19
18 return result; 20 return result;
19} 21}