Skip to content

Commit

Permalink
Fix compilation on non-x86 with linux_latest. (#961)
Browse files Browse the repository at this point in the history
* Fix compilation on non-x86 with linux_latest.

Fixes #958.

* Add some `cargo check` tests for linux_latest.
  • Loading branch information
sunfishcode committed Dec 6, 2023
1 parent cb1ffab commit 56acc55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
- run: cargo check --workspace --release -vv --all-targets
- run: cargo check --workspace --release -vv --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --features=use-libc,all-apis --all-targets
- run: cargo check --workspace --release -vv --features=linux_latest,all-apis --all-targets
- run: cargo check --workspace --release -vv --target=aarch64-linux-android --all-targets
- run: cargo check --workspace --release -vv --target=x86_64-unknown-linux-musl --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=x86_64-unknown-linux-musl --features=use-libc,all-apis --all-targets
Expand All @@ -106,7 +107,9 @@ jobs:
- run: cargo check --workspace --release -vv --target=i686-unknown-linux-musl --features=use-libc,all-apis --all-targets
- run: cargo check --workspace --release -vv --target=wasm32-unknown-emscripten --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=riscv64gc-unknown-linux-gnu --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=riscv64gc-unknown-linux-gnu --features=linux_latest,all-apis --all-targets
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-gnu --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-gnu --features=linux_latest,all-apis --all-targets
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-musl --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-musl --features=use-libc,all-apis --all-targets
- run: cargo check --workspace --release -vv --target=powerpc64le-unknown-linux-gnu --features=all-apis --all-targets
Expand Down
8 changes: 7 additions & 1 deletion src/backend/linux_raw/fs/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@

use crate::backend::c;
use crate::backend::conv::fs::oflags_for_open_how;
#[cfg(not(feature = "linux_4_11"))]
#[cfg(any(
not(feature = "linux_4_11"),
target_arch = "aarch64",
target_arch = "riscv64",
target_arch = "mips",
target_arch = "mips32r6",
))]
use crate::backend::conv::zero;
use crate::backend::conv::{
by_ref, c_int, c_uint, dev_t, opt_mut, pass_usize, raw_fd, ret, ret_c_int, ret_c_uint,
Expand Down

0 comments on commit 56acc55

Please sign in to comment.