summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/libstore/gc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc
index 08638b5115..77a2a7027d 100644
--- a/nix/libstore/gc.cc
+++ b/nix/libstore/gc.cc
@@ -608,7 +608,8 @@ void LocalStore::removeUnusedLinks(const GCState & state)
/* Drop links for files smaller than 'deduplicationMinSize', even if
they have more than one hard link. */
- if (st.st_nlink != 1 && st.st_size >= deduplicationMinSize) {
+ if (st.st_nlink != 1
+ && ((unsigned long long) st.st_size) >= deduplicationMinSize) {
actualSize += st.st_size;
unsharedSize += (st.st_nlink - 1) * st.st_size;
continue;