Skip to content

Conversation

@cho-m
Copy link

@cho-m cho-m commented Apr 14, 2025

When building on aarch64 (armv8-a) Linux (GitHub's ubuntu-22.04-arm runner and local VM), there was a build failure:

   Compiling ipc v0.0.1 (https://github.com/octobuild/ipc-rs#e8d76ee3)
error[E0308]: mismatched types
   --> /home/linuxbrew/.cache/Homebrew/cargo_cache/git/checkouts/ipc-rs-a7ac1f2a1bbcf2f1/e8d76ee/src/unix.rs:156:13
    |
155 |         let fd = libc::open(
    |                  ---------- arguments to this function are incorrect
156 |             filename.as_ptr() as *const i8,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*const u8`, found `*const i8`
    |
    = note: expected raw pointer `*const u8`
               found raw pointer `*const i8`

This seems due to how some platforms can define char as unsigned.

libc seems to take this into account via the libc::c_char:

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.

1 participant