We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getauxval
1 parent c633d5e commit 83c7512Copy full SHA for 83c7512
src/cpu/arm/linux.rs
@@ -47,17 +47,7 @@ pub fn detect_features() -> u32 {
47
#[cfg(not(target_env = "uclibc"))]
48
{
49
use super::CAPS_STATIC;
50
-
51
- // The `libc` crate doesn't provide this functionality on all
52
- // 32-bit Linux targets, like Android or -musl. Use this polyfill
53
- // for all 32-bit ARM targets so that testing on one of them will
54
- // be more meaningful to the others.
55
- use libc::c_ulong;
56
- extern "C" {
57
- pub fn getauxval(type_: c_ulong) -> c_ulong;
58
- }
59
- const AT_HWCAP: c_ulong = 16;
60
- const HWCAP_NEON: c_ulong = 1 << 12;
+ use libc::{getauxval, AT_HWCAP, HWCAP_NEON};
61
62
if CAPS_STATIC & Neon::mask() != Neon::mask() {
63
let caps = unsafe { getauxval(AT_HWCAP) };
0 commit comments