about summary refs log tree commit diff
path: root/src/libstd/os
diff options
context:
space:
mode:
authormsizanoen1 <qtmlabs@protonmail.com>2019-11-23 14:22:05 +0700
committermsizanoen1 <qtmlabs@protonmail.com>2020-01-01 09:52:18 +0700
commitb830b673e7369fc67ffa57e9a5140185315549d3 (patch)
treee32c6803ad05732febe85974a81b6e0407edf419 /src/libstd/os
parent38aa6bdfd705ea0604d7d5dd9fabc5e8f853a4fc (diff)
downloadrust-b830b673e7369fc67ffa57e9a5140185315549d3.tar.gz
rust-b830b673e7369fc67ffa57e9a5140185315549d3.zip
Add support for RISC-V 64-bit GNU/Linux
Diffstat (limited to 'src/libstd/os')
-rw-r--r--src/libstd/os/linux/raw.rs7
-rw-r--r--src/libstd/os/raw/mod.rs6
2 files changed, 10 insertions, 3 deletions
diff --git a/src/libstd/os/linux/raw.rs b/src/libstd/os/linux/raw.rs
index d9b2236047b..0caec97bb7b 100644
--- a/src/libstd/os/linux/raw.rs
+++ b/src/libstd/os/linux/raw.rs
@@ -230,7 +230,12 @@ mod arch {
     }
 }
 
-#[cfg(any(target_arch = "mips64", target_arch = "s390x", target_arch = "sparc64"))]
+#[cfg(any(
+    target_arch = "mips64",
+    target_arch = "s390x",
+    target_arch = "sparc64",
+    target_arch = "riscv64"
+))]
 mod arch {
     pub use libc::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
 }
diff --git a/src/libstd/os/raw/mod.rs b/src/libstd/os/raw/mod.rs
index e09012007f2..47daf0cce1b 100644
--- a/src/libstd/os/raw/mod.rs
+++ b/src/libstd/os/raw/mod.rs
@@ -18,7 +18,8 @@
             target_arch = "hexagon",
             target_arch = "powerpc",
             target_arch = "powerpc64",
-            target_arch = "s390x"
+            target_arch = "s390x",
+            target_arch = "riscv64"
         )
     ),
     all(target_os = "android", any(target_arch = "aarch64", target_arch = "arm")),
@@ -60,7 +61,8 @@ pub type c_char = u8;
             target_arch = "hexagon",
             target_arch = "powerpc",
             target_arch = "powerpc64",
-            target_arch = "s390x"
+            target_arch = "s390x",
+            target_arch = "riscv64"
         )
     ),
     all(target_os = "android", any(target_arch = "aarch64", target_arch = "arm")),