Fix build

http://hydra.nixos.org/build/44628517
This commit is contained in:
Eelco Dolstra 2016-12-08 20:36:14 +01:00
parent fe1162a805
commit e629a17cc1
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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();