forge
Explore
Log in

Don't you dare go Hollow

fix 32bit build: use portable-atomic

Browse files at this commit

7f26c3ee804fb6ed458ef7fb0e3c794f14e0b3bcPepper GrayParent: f036de6
building on 32bit fails with error:
```no `AtomicU64` in `sync::atomic```

add portable-atomic to use native types when available
and emulate them when not.

Bugs: #4331
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
Cargo.lockmodified+7 -0
@@ -2267,6 +2267,7 @@ dependencies = [
2267 "pipewire",2267 "pipewire",
2268 "pkg-config",2268 "pkg-config",
2269 "png",2269 "png",
2270+ "portable-atomic",
2270 "profiling",2271 "profiling",
2271 "proptest",2272 "proptest",
2272 "proptest-derive",2273 "proptest-derive",
@@ -2890,6 +2891,12 @@ dependencies = [
2890 "windows-sys 0.61.2",2891 "windows-sys 0.61.2",
2891 ]2892 ]
2892 2893
2894+[[package]]
2895+name = "portable-atomic"
2896+version = "1.14.0"
2897+source = "registry+https://github.com/rust-lang/crates.io-index"
2898+checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3"
2899+
2893 [[package]]2900 [[package]]
2894 name = "ppv-lite86"2901 name = "ppv-lite86"
2895 version = "0.2.21"2902 version = "0.2.21"
Cargo.tomlmodified+1 -0
@@ -82,6 +82,7 @@ pango = { version = "0.21.5", features = ["v1_44"] }
82 pangocairo = "0.21.5"82 pangocairo = "0.21.5"
83 pipewire = { version = "0.10.0", optional = true, features = ["v0_3_33"] }83 pipewire = { version = "0.10.0", optional = true, features = ["v0_3_33"] }
84 png = "0.18.1"84 png = "0.18.1"
85+portable-atomic = "1"
85 profiling = "1.0.17"86 profiling = "1.0.17"
86 sd-notify = "0.5.0"87 sd-notify = "0.5.0"
87 serde.workspace = true88 serde.workspace = true
src/utils/id.rsmodified+3 -1
@@ -1,4 +1,6 @@
1-use std::sync::atomic::{AtomicU64, Ordering};1+use std::sync::atomic::Ordering;
2+
3+use portable_atomic::AtomicU64;
2 4
3 /// Counter that returns unique IDs.5 /// Counter that returns unique IDs.
4 pub struct IdCounter {6 pub struct IdCounter {