Skip to content

Commit 6801218

Browse files
committed
linux: riscv32: Add support for the 64-bit time_t RV32 glibc port
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
1 parent 9c17cad commit 6801218

File tree

5 files changed

+894
-4
lines changed

5 files changed

+894
-4
lines changed

src/unix/linux_like/linux/align.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ macro_rules! expand_align {
88
target_arch = "s390x",
99
target_arch = "sparc64",
1010
target_arch = "aarch64",
11-
target_arch = "riscv64"),
11+
target_arch = "riscv64",
12+
target_arch = "riscv32"),
1213
repr(align(4)))]
1314
#[cfg_attr(not(any(target_pointer_width = "32",
1415
target_arch = "x86_64",
@@ -17,7 +18,8 @@ macro_rules! expand_align {
1718
target_arch = "s390x",
1819
target_arch = "sparc64",
1920
target_arch = "aarch64",
20-
target_arch = "riscv64")),
21+
target_arch = "riscv64",
22+
target_arch = "riscv32")),
2123
repr(align(8)))]
2224
pub struct pthread_mutexattr_t {
2325
#[doc(hidden)]

src/unix/linux_like/linux/gnu/b32/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ cfg_if! {
278278
} else if #[cfg(target_arch = "sparc")] {
279279
mod sparc;
280280
pub use self::sparc::*;
281+
} else if #[cfg(any(target_arch = "riscv32"))] {
282+
mod riscv32;
283+
pub use self::riscv32::*;
281284
} else {
282285
// Unknown target_arch
283286
}

0 commit comments

Comments
 (0)