void-packages/srcpkgs/ugdb/patches/0002-fix-build-on-platforms...

35 lines
1004 B
Diff

From 1add8448a097566dab2463f9383f6dccaf307bdd Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 10 Aug 2021 18:52:51 +0200
Subject: [PATCH 2/2] fix build on platforms without 64-bit atomics
---
src/main.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 5af4b8b..17e0ab3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -256,7 +256,7 @@ struct MpscTimer {
next_sender: Option<Sender<Event>>,
sender: Sender<Event>,
evt_fn: Box<dyn Fn() -> Event>,
- counter: std::sync::Arc<std::sync::atomic::AtomicU64>,
+ counter: std::sync::Arc<std::sync::atomic::AtomicUsize>,
}
impl MpscTimer {
@@ -265,7 +265,7 @@ impl MpscTimer {
next_sender: Some(sender.clone()),
sender,
evt_fn,
- counter: std::sync::Arc::new(std::sync::atomic::AtomicU64::new(0)),
+ counter: std::sync::Arc::new(std::sync::atomic::AtomicUsize::new(0)),
}
}
--
2.40.0