1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

time: fix V compilation for solaris

This commit is contained in:
Delyan Angelov 2021-07-24 07:55:48 +03:00
parent 29cda252f1
commit 29f55bdf9b

View File

@ -9,7 +9,7 @@ fn solaris_now() Time {
mut ts := C.timespec{}
C.clock_gettime(C.CLOCK_REALTIME, &ts)
loc_tm := C.tm{}
C.localtime_r(&ts.tv_sec, &loc_tm)
C.localtime_r(voidptr(&ts.tv_sec), &loc_tm)
return convert_ctime(loc_tm, int(ts.tv_nsec / 1000))
}