Open jirutka opened 7 months ago
Just confirming, are you building on a 32 bit system?
No, this is from x86_64.
Ah I see for musl the libc crate uses i32 instead of u64 for ioctl: https://docs.rs/libc/0.2.153/x86_64-unknown-linux-musl/libc/fn.ioctl.html
The constant is u64 in musl libc: https://docs.rs/libc/0.2.153/x86_64-unknown-linux-musl/libc/constant.SIOCETHTOOL.html.
Probably the best option here is to do the cast as suggested by the compiler. Do you mind testing out that change?
termux/termux-packages#19609
This problem is there for libfs
as well.
cargo install --target x86_64-unknown-linux-musl xcp
fails too.
error[E0308]: mismatched types
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/libfs-0.7.2/src/linux.rs:153:45
|
153 | if unsafe { libc::ioctl(fd.as_raw_fd(), FS_IOC_FIEMAP as u64, req_ptr) } != 0 {
| ----------- ^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u64`
| |
| arguments to this function are incorrect
|