From e629a17cc1781360918640642444643131b02f8c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 8 Dec 2016 20:36:14 +0100 Subject: [PATCH] Fix build http://hydra.nixos.org/build/44628517 --- src/libstore/build.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index bbf3c8bc9..01a9d027b 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(nearest - before).count()); + timeout.tv_sec = std::max(1L, (long) std::chrono::duration_cast(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( + (long) std::chrono::duration_cast( lastWokenUp + std::chrono::seconds(settings.pollInterval) - before).count()); } else lastWokenUp = steady_time_point::min();