File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
crates/std_detect/src/detect/os/linux Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -89,11 +89,10 @@ pub(crate) fn auxv() -> Result<AuxVec, ()> {
8989
9090 #[ cfg( not( feature = "std_detect_dlsym_getauxval" ) ) ]
9191 {
92- let hwcap = unsafe { libc:: getauxval ( AT_HWCAP as libc:: c_ulong ) as usize } ;
93-
9492 // Targets with only AT_HWCAP:
9593 #[ cfg( any( target_arch = "aarch64" , target_arch = "mips" , target_arch = "mips64" ) ) ]
9694 {
95+ let hwcap = unsafe { libc:: getauxval ( AT_HWCAP as libc:: c_ulong ) as usize } ;
9796 if hwcap != 0 {
9897 return Ok ( AuxVec { hwcap } ) ;
9998 }
@@ -106,6 +105,7 @@ pub(crate) fn auxv() -> Result<AuxVec, ()> {
106105 target_arch = "powerpc64"
107106 ) ) ]
108107 {
108+ let hwcap = unsafe { libc:: getauxval ( AT_HWCAP as libc:: c_ulong ) as usize } ;
109109 let hwcap2 = unsafe { libc:: getauxval ( AT_HWCAP2 as libc:: c_ulong ) as usize } ;
110110 if hwcap != 0 && hwcap2 != 0 {
111111 return Ok ( AuxVec { hwcap, hwcap2 } ) ;
You can’t perform that action at this time.
0 commit comments