Skip to content

Commit

Permalink
Fix get_sys_value change
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas committed Nov 5, 2023
1 parent 63196da commit 69a4a81
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/unix/apple/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,11 @@ fn get_system_info(value: c_int, default: Option<&str>) -> Option<String> {

pub(crate) fn get_cpu_arch() -> Option<String> {
use std::ffi::CStr;
let mut mib: [c_int; 2] = [libc::CTL_HW, libc::HW_MACHINE_ARCH];
let mut arch_str: [u8; 32] = [0; 32];

unsafe {
let mut mib = [libc::CTL_HW as _, libc::HW_MACHINE as _];
if get_sys_value(
libc::CTL_HW as _,
libc::HW_MACHINE as _,
mem::size_of::<[u8; 32]>(),
arch_str.as_mut_ptr() as *mut _,
&mut mib,
Expand Down

0 comments on commit 69a4a81

Please sign in to comment.