mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
Fix compile failures on tor_gettimeofday() fix for windows
svn:r4685
This commit is contained in:
parent
41e48519d0
commit
98f1265309
@ -838,8 +838,8 @@ tor_gettimeofday(struct timeval *timeval)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
ft.ft_64 -= EPOCH_BIAS;
|
ft.ft_64 -= EPOCH_BIAS;
|
||||||
tv->tv_sec = ft.ft_64 / UNITS_PER_SEC;
|
timeval->tv_sec = (unsigned) (ft.ft_64 / UNITS_PER_SEC);
|
||||||
tv->tv_usec = (ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC;
|
timeval->tv_usec = (unsigned) ((ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC);
|
||||||
#elif defined(HAVE_GETTIMEOFDAY)
|
#elif defined(HAVE_GETTIMEOFDAY)
|
||||||
if (gettimeofday(timeval, NULL)) {
|
if (gettimeofday(timeval, NULL)) {
|
||||||
log_fn(LOG_ERR, "gettimeofday failed.");
|
log_fn(LOG_ERR, "gettimeofday failed.");
|
||||||
|
Loading…
Reference in New Issue
Block a user