Fix build failure on GCC 5.4

This commit is contained in:
Eelco Dolstra
2016-09-30 17:05:07 +02:00
parent fb5e7f9570
commit b1512a152a
3 changed files with 6 additions and 4 deletions

View File

@ -38,7 +38,7 @@ void State::builder(MachineReservation::ptr reservation)
step_->tries++;
nrRetries++;
if (step_->tries > maxNrRetries) maxNrRetries = step_->tries; // yeah yeah, not atomic
int delta = retryInterval * powf(retryBackoff, step_->tries - 1) + (rand() % 10);
int delta = retryInterval * std::pow(retryBackoff, step_->tries - 1) + (rand() % 10);
printMsg(lvlInfo, format("will retry %1% after %2%s") % step->drvPath % delta);
step_->after = std::chrono::system_clock::now() + std::chrono::seconds(delta);
}