summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-08-03 17:16:48 +0000
committerNick Mathewson <nickm@torproject.org>2005-08-03 17:16:48 +0000
commit98f12653098bbbc480495ba2e183e439c857911a (patch)
treecf26281daba77cce1ecf22dc60a0c05c405bbd3d
parent41e48519d09dbd24d3c2614e2451b3f50d2c9327 (diff)
downloadtor-98f12653098bbbc480495ba2e183e439c857911a.tar.gz
tor-98f12653098bbbc480495ba2e183e439c857911a.zip
Fix compile failures on tor_gettimeofday() fix for windows
svn:r4685
-rw-r--r--src/common/compat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 316c335e19..abe6714716 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -838,8 +838,8 @@ tor_gettimeofday(struct timeval *timeval)
exit(1);
}
ft.ft_64 -= EPOCH_BIAS;
- tv->tv_sec = ft.ft_64 / UNITS_PER_SEC;
- tv->tv_usec = (ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC;
+ timeval->tv_sec = (unsigned) (ft.ft_64 / UNITS_PER_SEC);
+ timeval->tv_usec = (unsigned) ((ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC);
#elif defined(HAVE_GETTIMEOFDAY)
if (gettimeofday(timeval, NULL)) {
log_fn(LOG_ERR, "gettimeofday failed.");