Skip to content

Commit 7db4619

Browse files
authored
Merge pull request #1640 from andreas-schwab/master
Misc fixes for riscv64-linux-gnu
2 parents bb496cf + 481764d commit 7db4619

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
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/gnu/b64/riscv64/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,22 @@ s! {
205205
pub l_len: ::off_t,
206206
pub l_pid: ::pid_t,
207207
}
208+
209+
pub struct flock64 {
210+
pub l_type: ::c_short,
211+
pub l_whence: ::c_short,
212+
pub l_start: ::off64_t,
213+
pub l_len: ::off64_t,
214+
pub l_pid: ::pid_t,
215+
}
208216
}
209217

210218
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
211219
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
212220
pub const VEOF: usize = 4;
221+
pub const RTLD_DEEPBIND: ::c_int = 0x8;
222+
pub const RTLD_GLOBAL: ::c_int = 0x100;
223+
pub const RTLD_NOLOAD: ::c_int = 0x4;
213224
pub const TIOCGSOFTCAR: ::c_ulong = 21529;
214225
pub const TIOCSSOFTCAR: ::c_ulong = 21530;
215226
pub const TIOCGRS485: ::c_int = 21550;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,8 @@ cfg_if! {
907907
target_arch = "arm",
908908
target_arch = "x86",
909909
target_arch = "x86_64",
910-
target_arch = "s390x"
910+
target_arch = "s390x",
911+
target_arch = "riscv64"
911912
))] {
912913
pub const PTHREAD_STACK_MIN: ::size_t = 16384;
913914
} else if #[cfg(any(

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)