blob: a3a47c8400cc843db1d1cc89a91557d6110b20cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$NetBSD: patch-src_Toolbar.cc,v 1.1 2018/10/12 18:00:55 he Exp $
Fix build failure when time_t is 64 bits on a 32-bit machine.
--- src/Toolbar.cc.orig 2016-07-10 16:31:38.000000000 +0000
+++ src/Toolbar.cc
@@ -43,8 +43,10 @@
long nextTimeout(int resolution)
{
timeval now;
+ int secs;
gettimeofday(&now, 0);
- return (std::max(1000l, ((((resolution - (now.tv_sec % resolution)) * 1000l))
+ secs = now.tv_sec % resolution;
+ return (std::max(1000l, ((((resolution - secs) * 1000l))
- (now.tv_usec / 1000l))));
}
|