Skip to content

Commit 44d88a5

Browse files
committed
Fix macos aarch64 errors
1 parent d6f4631 commit 44d88a5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

mallockit/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#![feature(adt_const_params)]
1111
#![feature(generic_const_exprs)]
1212
#![feature(effects)]
13+
#![feature(asm_const)]
1314

1415
extern crate mallockit_proc_macro;
1516
pub extern crate spin;
@@ -40,8 +41,9 @@ const ERROR: ! = "32-bit is not supported";
4041

4142
#[cfg(not(any(
4243
all(target_os = "linux", target_arch = "x86_64"),
43-
all(target_os = "macos", target_arch = "x86_64"),
4444
all(target_os = "linux", target_arch = "aarch64"),
45+
all(target_os = "macos", target_arch = "x86_64"),
46+
all(target_os = "macos", target_arch = "aarch64"),
4547
)))]
4648
const ERROR: ! = r#"
4749
❌ Unsupported Platform.

mallockit/src/util/macos_malloc_zone.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::ptr::addr_of;
2+
13
use super::Address;
24

35
const ZONE_NAME: &'static [i8] = &[
@@ -18,7 +20,7 @@ pub static mut MALLOCKIT_MALLOC_ZONE: MallocZone = MallocZone {
1820
batch_malloc: 0 as _,
1921
// Nullable
2022
batch_free: 0 as _,
21-
introspect: unsafe { &MALLOCKIT_MALLOC_INTROSPECTION },
23+
introspect: unsafe { addr_of!(MALLOCKIT_MALLOC_INTROSPECTION) },
2224
version: 9,
2325
memalign: zone_memalign,
2426
free_definite_size: 0 as _,

0 commit comments

Comments
 (0)