mirror of
https://github.com/NixOS/nix
synced 2025-06-25 23:11:16 +02:00
Fix 32-bit overflow with --no-net
--no-net causes tarballTtl to be set to the largest 32-bit integer,
which causes comparison like 'time + tarballTtl < other_time' to
fail on 32-bit systems. So cast them to 64-bit first.
https://hydra.nixos.org/build/95076624
(cherry picked from commit 29ccb2e969
)
This commit is contained in:
parent
f8b30338ac
commit
64ec087f58
3 changed files with 7 additions and 10 deletions
|
@ -116,7 +116,7 @@ GitInfo exportGit(ref<Store> store, const std::string & uri,
|
|||
git fetch to update the local ref to the remote ref. */
|
||||
struct stat st;
|
||||
doFetch = stat(localRefFile.c_str(), &st) != 0 ||
|
||||
st.st_mtime + settings.tarballTtl <= now;
|
||||
(uint64_t) st.st_mtime + settings.tarballTtl <= (uint64_t) now;
|
||||
}
|
||||
if (doFetch)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue