-
Notifications
You must be signed in to change notification settings - Fork 10
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
c-scape: Incompatible type in listxattr #132
Comments
`READ_BUFFER` was originally added for `read`, but `read` no longer needs it now that we can use `rustix::io::read_uninit`. So the only thing left using `READ_BUFFER` is the xattr functions. It wasn't really correct for the xattr functions to use a `PIPE_BUF`-sized buffer anyway, so remove `READ_BUFFER` entirely and just use `Vec`s for their buffers. This also fixes compile errors with u8/i8 mismatches when `linux-raw-sys/std` is enabled. Fixes #132.
Thanks for the report! I've now filed #133 to fix it. |
`READ_BUFFER` was originally added for `read`, but `read` no longer needs it now that we can use `rustix::io::read_uninit`. So the only thing left using `READ_BUFFER` is the xattr functions. It wasn't really correct for the xattr functions to use a `PIPE_BUF`-sized buffer anyway, so remove `READ_BUFFER` entirely and just use `Vec`s for their buffers. This also fixes compile errors with u8/i8 mismatches when `linux-raw-sys/std` is enabled. Fixes #132.
Thanks! With that I got a rebased version of your coreutils patch to compile :) Edit: Using |
This is now released in c-scape 0.16.0 and eyra 0.16.11. |
Thanks a lot, I've finally switched https://github.com/pothos/rust-userland to use Eyra |
Cool! |
I run into mismatches types because
c-scape:src/fs/xattr.rs
hasREAD_BUFFER
as[u8]
and passes it torustix::fs::listxattr
which expects[i8]
(actuallyc::c_char
).That happens with rustix 0.38.34 and Eyra from main. Using the
nightly-2024-04-21
from the Eyra toolchain didn't help.Other functions such as
fgetxattr
in rustix expect u8 and if rustix is right if might make sense to add a second READ_BUFFER definition in c-scape that usesi8
, or?The text was updated successfully, but these errors were encountered: