Skip to content

Commit 01ca4a4

Browse files
Fix alignment of struct pthread_mutexattr_t for riscv64-linux-gnu
1 parent f9e7aac commit 01ca4a4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/unix/linux_like/linux/align.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ macro_rules! expand_align {
77
target_arch = "mips64",
88
target_arch = "s390x",
99
target_arch = "sparc64",
10-
target_arch = "aarch64"),
10+
target_arch = "aarch64",
11+
target_arch = "riscv64"),
1112
repr(align(4)))]
1213
#[cfg_attr(not(any(target_pointer_width = "32",
1314
target_arch = "x86_64",
1415
target_arch = "powerpc64",
1516
target_arch = "mips64",
1617
target_arch = "s390x",
1718
target_arch = "sparc64",
18-
target_arch = "aarch64")),
19+
target_arch = "aarch64",
20+
target_arch = "riscv64")),
1921
repr(align(8)))]
2022
pub struct pthread_mutexattr_t {
2123
#[doc(hidden)]

src/unix/linux_like/linux/no_align.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ macro_rules! expand_align {
77
target_arch = "mips64",
88
target_arch = "s390x",
99
target_arch = "sparc64",
10+
target_arch = "riscv64",
1011
all(target_arch = "aarch64",
1112
target_env = "musl")))]
1213
__align: [::c_int; 0],
@@ -15,6 +16,7 @@ macro_rules! expand_align {
1516
target_arch = "mips64",
1617
target_arch = "s390x",
1718
target_arch = "sparc64",
19+
target_arch = "riscv64",
1820
all(target_arch = "aarch64",
1921
target_env = "musl"))))]
2022
__align: [::c_long; 0],

0 commit comments

Comments
 (0)