void-packages/srcpkgs/dua-cli/patches/atomicu64.patch

35 lines
939 B
Diff

From 5857da8941bdfde02d10c9380086525f2199bbcb Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Wed, 9 Jun 2021 02:28:55 +0200
Subject: [PATCH] fix on platforms without 64-bit atomics
---
src/aggregate.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git src/aggregate.rs src/aggregate.rs
index dacaaa7..6fc474d 100644
--- a/src/aggregate.rs
+++ b/src/aggregate.rs
@@ -8,7 +8,7 @@ use std::{
io,
path::Path,
sync::{
- atomic::{AtomicU64, Ordering},
+ atomic::{AtomicUsize, Ordering},
Arc,
},
thread,
@@ -35,7 +35,7 @@ pub fn aggregate(
let mut aggregates = Vec::new();
let mut inodes = InodeFilter::default();
let paths: Vec<_> = paths.into_iter().collect();
- let shared_count = Arc::new(AtomicU64::new(0));
+ let shared_count = Arc::new(AtomicUsize::new(0));
if let Some(mut err) = err {
thread::spawn({
--
2.31.1