Skip to content

Commit 56acc55

Browse files
authored
Fix compilation on non-x86 with linux_latest. (#961)
* Fix compilation on non-x86 with linux_latest. Fixes #958. * Add some `cargo check` tests for linux_latest.
1 parent cb1ffab commit 56acc55

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
- run: cargo check --workspace --release -vv --all-targets
8888
- run: cargo check --workspace --release -vv --features=all-apis --all-targets
8989
- run: cargo check --workspace --release -vv --features=use-libc,all-apis --all-targets
90+
- run: cargo check --workspace --release -vv --features=linux_latest,all-apis --all-targets
9091
- run: cargo check --workspace --release -vv --target=aarch64-linux-android --all-targets
9192
- run: cargo check --workspace --release -vv --target=x86_64-unknown-linux-musl --features=all-apis --all-targets
9293
- run: cargo check --workspace --release -vv --target=x86_64-unknown-linux-musl --features=use-libc,all-apis --all-targets
@@ -106,7 +107,9 @@ jobs:
106107
- run: cargo check --workspace --release -vv --target=i686-unknown-linux-musl --features=use-libc,all-apis --all-targets
107108
- run: cargo check --workspace --release -vv --target=wasm32-unknown-emscripten --features=all-apis --all-targets
108109
- run: cargo check --workspace --release -vv --target=riscv64gc-unknown-linux-gnu --features=all-apis --all-targets
110+
- run: cargo check --workspace --release -vv --target=riscv64gc-unknown-linux-gnu --features=linux_latest,all-apis --all-targets
109111
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-gnu --features=all-apis --all-targets
112+
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-gnu --features=linux_latest,all-apis --all-targets
110113
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-musl --features=all-apis --all-targets
111114
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-musl --features=use-libc,all-apis --all-targets
112115
- run: cargo check --workspace --release -vv --target=powerpc64le-unknown-linux-gnu --features=all-apis --all-targets

src/backend/linux_raw/fs/syscalls.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88

99
use crate::backend::c;
1010
use crate::backend::conv::fs::oflags_for_open_how;
11-
#[cfg(not(feature = "linux_4_11"))]
11+
#[cfg(any(
12+
not(feature = "linux_4_11"),
13+
target_arch = "aarch64",
14+
target_arch = "riscv64",
15+
target_arch = "mips",
16+
target_arch = "mips32r6",
17+
))]
1218
use crate::backend::conv::zero;
1319
use crate::backend::conv::{
1420
by_ref, c_int, c_uint, dev_t, opt_mut, pass_usize, raw_fd, ret, ret_c_int, ret_c_uint,

0 commit comments

Comments
 (0)