[or-cvs] Fix compile failures on tor_gettimeofday() fix for windows

Nick Mathewson nickm at seul.org
Wed Aug 3 17:16:50 UTC 2005


Update of /home/or/cvsroot/tor/src/common
In directory moria:/tmp/cvs-serv6950/src/common

Modified Files:
	compat.c 
Log Message:
Fix compile failures on tor_gettimeofday() fix for windows

Index: compat.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/compat.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- compat.c	3 Aug 2005 16:28:39 -0000	1.62
+++ compat.c	3 Aug 2005 17:16:48 -0000	1.63
@@ -838,8 +838,8 @@
     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.");



More information about the tor-commits mailing list