Skip to content

Commit ecffd09

Browse files
committed
fix symbols names on macOS aarch64
1 parent c7b9771 commit ecffd09

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3273,7 +3273,7 @@ extern "C" {
32733273
pub fn setgrent();
32743274
#[doc(hidden)]
32753275
#[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.5")]
3276-
#[link_name = "daemon$1050"]
3276+
#[cfg_attr(not(target_arch = "aarch64"), link_name = "daemon$1050")]
32773277
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
32783278
#[doc(hidden)]
32793279
#[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.10")]
@@ -3441,9 +3441,15 @@ extern "C" {
34413441
) -> ::c_int;
34423442
pub fn __error() -> *mut ::c_int;
34433443
pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int;
3444-
#[cfg_attr(target_os = "macos", link_name = "statfs$INODE64")]
3444+
#[cfg_attr(
3445+
all(target_os = "macos", not(target_arch = "aarch64")),
3446+
link_name = "statfs$INODE64"
3447+
)]
34453448
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
3446-
#[cfg_attr(target_os = "macos", link_name = "fstatfs$INODE64")]
3449+
#[cfg_attr(
3450+
all(target_os = "macos", not(target_arch = "aarch64")),
3451+
link_name = "fstatfs$INODE64"
3452+
)]
34473453
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
34483454
pub fn kevent(
34493455
kq: ::c_int,

0 commit comments

Comments
 (0)