Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation error with target_env=ohos #2301

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

Chilledheart
Copy link
Contributor

OpenHarmony(alias ohos) is tie 3 supported target for rust. see rust-lang/compiler-team#568.

In implementation it sits close to musl instead of bionic and napi instead jni when comparing with android.

What does this PR do

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@Chilledheart Chilledheart changed the title Fix compilation with target_env=ohos Fix compilation error with target_env=ohos Jan 28, 2024
src/sys/statfs.rs Outdated Show resolved Hide resolved
OpenHarmony(alias ohos) is tie 3 supported target for rust.
see rust-lang/compiler-team#568.

In implementation it sits close to musl instead of bionic
and napi instead jni when comparing with android.

Tested with:
- cargo build --target x86_64-unknown-linux-ohos --features acct,dir,env,fs
- cargo build --target aarch64-unknown-linux-ohos --features acct,dir,env,fs
@SteveLauC
Copy link
Member

Merge this PR because I don't want Nix to be broken on this target.

Though I believe we should avoid cfg(not) as much as possible since targets are constantly added to Rust, using cfg(not) makes Nix inherently broken on these newly-added targets.

@SteveLauC SteveLauC added this pull request to the merge queue Jan 30, 2024
Merged via the queue into nix-rust:master with commit 6d30883 Jan 30, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants