Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/backend/libc/fs/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ weak!(fn __futimens64(c::c_int, *const LibcTimespec) -> c::c_int);
/// This is only currently necessary as a workaround for old glibc; see below.
#[cfg(all(unix, target_env = "gnu"))]
fn open_via_syscall(path: &CStr, oflags: OFlags, mode: Mode) -> io::Result<OwnedFd> {
// Linux on aarch64 and riscv64 has no `open` syscall so use `openat`.
// Linux on aarch64, loongarch64 and riscv64 has no `open` syscall so use `openat`.
#[cfg(any(
target_arch = "aarch64",
target_arch = "riscv32",
target_arch = "riscv64"
target_arch = "riscv64",
target_arch = "loongarch64"
))]
{
openat_via_syscall(CWD, path, oflags, mode)
Expand All @@ -98,7 +99,8 @@ fn open_via_syscall(path: &CStr, oflags: OFlags, mode: Mode) -> io::Result<Owned
#[cfg(not(any(
target_arch = "aarch64",
target_arch = "riscv32",
target_arch = "riscv64"
target_arch = "riscv64",
target_arch = "loongarch64"
)))]
unsafe {
syscall! {
Expand Down