summaryrefslogtreecommitdiff
path: root/wm/blackbox70/patches/patch-src_Toolbar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'wm/blackbox70/patches/patch-src_Toolbar.cc')
-rw-r--r--wm/blackbox70/patches/patch-src_Toolbar.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/wm/blackbox70/patches/patch-src_Toolbar.cc b/wm/blackbox70/patches/patch-src_Toolbar.cc
new file mode 100644
index 00000000000..a3a47c8400c
--- /dev/null
+++ b/wm/blackbox70/patches/patch-src_Toolbar.cc
@@ -0,0 +1,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))));
+ }
+