Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build error on not 64 bit arch #370

Merged
merged 2 commits into from
Dec 27, 2024
Merged

Conversation

ryota2357
Copy link
Contributor

AtomicU64 and AtomicI64 are defined only if target_pointer_width = 64

loom/src/sync/atomic/int.rs

Lines 193 to 197 in 3ef62e2

#[cfg(target_pointer_width = "64")]
atomic_int!(AtomicU64, u64);
#[cfg(target_pointer_width = "64")]
atomic_int!(AtomicI64, i64);

But they are exported for all targets

mod int;
pub use self::int::{AtomicI16, AtomicI32, AtomicI64, AtomicI8, AtomicIsize};
pub use self::int::{AtomicU16, AtomicU32, AtomicU64, AtomicU8, AtomicUsize};

@taiki-e
Copy link
Member

taiki-e commented Dec 27, 2024

Thanks for the PR. I think we should use target_has_atomic = "64" instead of target_pointer_width = "64".

@ryota2357
Copy link
Contributor Author

ryota2357 commented Dec 27, 2024

Thanks, I changed to target_has_atomic = 64. This seems to be better.

@taiki-e taiki-e merged commit 0624ff3 into tokio-rs:master Dec 27, 2024
5 checks passed
@ryota2357 ryota2357 deleted the fix-build-err branch December 27, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants