From 98f12653098bbbc480495ba2e183e439c857911a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 3 Aug 2005 17:16:48 +0000 Subject: [PATCH] Fix compile failures on tor_gettimeofday() fix for windows svn:r4685 --- src/common/compat.c | 4 ++-- 1 file 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.");