about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-12-08T19·36+0100
committerEelco Dolstra <edolstra@gmail.com>2016-12-08T19·36+0100
commite629a17cc1781360918640642444643131b02f8c (patch)
treed3c5443851c8e2ff8b5f1e2af26621e42040ed28 /src/libstore/build.cc
parentfe1162a8051194bc6e741408c5feb45ed1be18d8 (diff)
Fix build
http://hydra.nixos.org/build/44628517
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index bbf3c8bc92ea..01a9d027b96f 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -3666,7 +3666,7 @@ void Worker::waitForInput()
             nearest = std::min(nearest, i.timeStarted + std::chrono::seconds(settings.buildTimeout));
     }
     if (nearest != steady_time_point::max()) {
-        timeout.tv_sec = std::max(1L, std::chrono::duration_cast<std::chrono::seconds>(nearest - before).count());
+        timeout.tv_sec = std::max(1L, (long) std::chrono::duration_cast<std::chrono::seconds>(nearest - before).count());
         useTimeout = true;
     }
 
@@ -3678,7 +3678,7 @@ void Worker::waitForInput()
             printError("waiting for locks or build slots...");
         if (lastWokenUp == steady_time_point::min() || lastWokenUp > before) lastWokenUp = before;
         timeout.tv_sec = std::max(1L,
-            std::chrono::duration_cast<std::chrono::seconds>(
+            (long) std::chrono::duration_cast<std::chrono::seconds>(
                 lastWokenUp + std::chrono::seconds(settings.pollInterval) - before).count());
     } else lastWokenUp = steady_time_point::min();