Skip to content

Commit c7f373b

Browse files
committed
Disable MADV_SOFT_OFFLINE on riscv for now.
Upstream fix submitted in rust-lang/libc#2391.
1 parent 0e85369 commit c7f373b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/imp/libc/io/poll_fd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ bitflags! {
3333
const NVAL = libc::POLLNVAL;
3434
/// `POLLRDHUP`
3535
// TODO: Submitted to upstream libc:
36-
// <https://github.com/rust-lang/libc/pull/2247>
36+
// <https://github.com/rust-lang/libc/pull/2390>
3737
#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64")))]
3838
const RDHUP = 0x2000;
3939
}

src/imp/libc/io/types.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,11 @@ pub enum Advice {
365365
#[cfg(any(target_os = "android", target_os = "linux"))]
366366
LinuxHwPoison = libc::MADV_HWPOISON,
367367
/// `MADV_SOFT_OFFLINE`
368-
#[cfg(any(target_os = "android", target_os = "linux"))]
368+
// TODO: Enable riscv once <https://github.com/rust-lang/libc/pull/2391> lands.
369+
#[cfg(all(
370+
not(target_arch = "riscv64"),
371+
any(target_os = "android", target_os = "linux")
372+
))]
369373
LinuxSoftOffline = libc::MADV_SOFT_OFFLINE,
370374
/// `MADV_MERGEABLE`
371375
#[cfg(any(target_os = "android", target_os = "linux"))]

0 commit comments

Comments
 (0)