Differential D32881 Diff 98160 lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_riscv64.rs
Changeset View
Changeset View
Standalone View
Standalone View
lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_riscv64.rs
- This file was added.
--- vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/riscv64.rs.orig 2021-11-05 13:41:21 UTC | |||||
+++ vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/riscv64.rs | |||||
@@ -0,0 +1,21 @@ | |||||
+pub type c_char = u8; | |||||
+pub type c_long = i64; | |||||
+pub type c_ulong = u64; | |||||
+pub type wchar_t = ::c_int; | |||||
+pub type time_t = i64; | |||||
+pub type suseconds_t = ::c_long; | |||||
+pub type register_t = i64; | |||||
+ | |||||
+// should be pub(crate), but that requires Rust 1.18.0 | |||||
+cfg_if! { | |||||
+ if #[cfg(libc_const_size_of)] { | |||||
+ #[doc(hidden)] | |||||
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; | |||||
+ } else { | |||||
+ #[doc(hidden)] | |||||
+ pub const _ALIGNBYTES: usize = 8 - 1; | |||||
+ } | |||||
+} | |||||
+ | |||||
+pub const MAP_32BIT: ::c_int = 0x00080000; | |||||
+pub const MINSIGSTKSZ: ::size_t = 4096; // 1024 * 4 |