Skip to content

Fix cmsg_len() return type on OpenHarmony#2456

Merged
asomers merged 1 commit intonix-rust:masterfrom
jschwe:jschwender/fix_cmesg
Jun 26, 2024
Merged

Fix cmsg_len() return type on OpenHarmony#2456
asomers merged 1 commit intonix-rust:masterfrom
jschwe:jschwender/fix_cmesg

Conversation

@jschwe
Copy link
Copy Markdown
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 force-pushed the jschwender/fix_cmesg branch from f79bcb9 to 6bd2197 Compare June 26, 2024 13:33
@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
@jschwe jschwe deleted the jschwender/fix_cmesg branch June 26, 2024 15:08
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