Skip to content

Commit bdc755b

Browse files
committed
add declaration of max_align_t for macOS on aarch64
1 parent 42fe290 commit bdc755b

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

src/unix/bsd/apple/b64/aarch64/align.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
s_no_extra_traits! {
2+
#[allow(missing_debug_implementations)]
3+
pub struct max_align_t {
4+
priv_: f64
5+
}
6+
}
7+
18
s! {
29
pub struct __darwin_mcontext64 {
310
pub __es: __darwin_arm_exception_state64,

src/unix/bsd/apple/b64/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,6 @@ extern "C" {
121121
) -> ::c_int;
122122
}
123123

124-
cfg_if! {
125-
if #[cfg(libc_align)] {
126-
mod align;
127-
pub use self::align::*;
128-
}
129-
}
130-
131124
cfg_if! {
132125
if #[cfg(target_arch = "x86_64")] {
133126
mod x86_64;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
s_no_extra_traits! {
2+
#[allow(missing_debug_implementations)]
3+
#[repr(align(16))]
4+
pub struct max_align_t {
5+
priv_: [f64; 2]
6+
}
7+
}

src/unix/bsd/apple/b64/x86_64.rs renamed to src/unix/bsd/apple/b64/x86_64/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,10 @@ s! {
9393
pub __xmm_reg: [::c_char; 16],
9494
}
9595
}
96+
97+
cfg_if! {
98+
if #[cfg(libc_align)] {
99+
mod align;
100+
pub use self::align::*;
101+
}
102+
}

0 commit comments

Comments
 (0)