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 cmsg_len() return type on OpenHarmony #2456

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

jschwe
Copy link
Contributor

@jschwe jschwe commented Jun 26, 2024

What does this PR do

target_env = "ohos" (OpenHarmony) uses a musl based libc. Fixes a compilation failure when targeting aarch64-unknown-linux-ohos:

error[E0308]: mismatched types
    --> /home/jschwender/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.29.0/src/sys/socket/mod.rs:1415:32
     |
1415 |             (*cmsg).cmsg_len = self.cmsg_len();
     |             ----------------   ^^^^^^^^^^^^^^^ expected `u32`, found `usize`
     |             |
     |             expected due to the type of this binding

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

@jschwe jschwe changed the title Fix cmsg_len() on OpenHarmony Fix cmsg_len() return type on OpenHarmony Jun 26, 2024
@jschwe jschwe marked this pull request as ready for review June 26, 2024 14:00
@asomers asomers added this pull request to the merge queue Jun 26, 2024
Merged via the queue into nix-rust:master with commit 0f53575 Jun 26, 2024
36 checks passed
@jschwe jschwe deleted the jschwender/fix_cmesg branch June 26, 2024 15:08
@Chilledheart
Copy link
Contributor

Thanks, Schwender.

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.

3 participants