2021-06-09 02:29:45 +02:00
|
|
|
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
|
srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
for p in ${template%/template}/patches/*; do
sed -i '
\,^[+-][+-][+-] /dev/null,b
/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
s,^[*][*][*] ,&a/,
/^--- /{
s,\(^--- \)\(./\)*,\1a/,
s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1,
s/[.][Oo][Rr][Ii][Gg]$//
s/[.]patched[.]\([^.]\)/.\1/
h
}
/^+++ -/{
g
s/^--- a/+++ b/
b
}
s,\(^+++ \)\(./\)*,\1b/,
' "$p"
done
sed -i '/^patch_args=/d' $template
done
```
2021-06-19 05:03:21 +02:00
|
|
|
--- a/src/aggregate.rs
|
|
|
|
+++ b/src/aggregate.rs
|
2021-06-09 02:29:45 +02:00
|
|
|
@@ -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
|
|
|
|
|