Files
SpotiFLAC-Mobile/rust_backend/vendor/rustix-1.1.4/src/static_assertions.rs
T
zarzet 1d53609b51 fix(android): avoid blocked statx probes on legacy ARM32 devices
Vendor the pinned Rustix package with an Android-only weak libc lookup so missing statx returns ENOSYS and uses the existing stat64 fallback. Add an isolated Android smoke test with a hidden symbol and a seccomp filter that kills raw statx probes.

Verified 177 workspace tests, host Clippy, and ARM64 Android sandbox smoke test. ARM32 cross-target Clippy passes with the existing needless_return warning in binary.rs exempted; physical Android 10 ARM32 validation remains required.
2026-09-25 17:24:54 +07:00

37 lines
890 B
Rust
Vendored

//! Workarounds for Rust 1.63 where some things in the `static_assertions`
//! crate do things that don't work in const contexts. We want to call them in
//! const contexts in Rust versions where that's supported so that problems are
//! caught at compile time, and fall back to dynamic asserts in Rust 1.63.
#![allow(unused_macros)]
macro_rules! assert_eq_size {
($x:ty, $y:ty) => {
assert_eq!(core::mem::size_of::<$x>(), core::mem::size_of::<$y>());
};
}
macro_rules! assert_eq_align {
($x:ty, $y:ty) => {
assert_eq!(core::mem::align_of::<$x>(), core::mem::align_of::<$y>());
};
}
macro_rules! const_assert_eq {
($x:expr, $y:expr) => {
assert_eq!($x, $y);
};
}
macro_rules! const_assert_ne {
($x:expr, $y:expr) => {
assert_ne!($x, $y);
};
}
macro_rules! const_assert {
($x:expr) => {
assert!($x);
};
}