Skip to content

Fix rustix 0.38.42 build on riscv32 #1435

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

Closed
wants to merge 1 commit into from

Conversation

kraj
Copy link

@kraj kraj commented Apr 5, 2025

RISCV32 libc does not have these defines so use them from linux_raw_sys crate

ioctl() signare does not match between musl and glibc ioctl is called the glibc way with ioctl(int, unsigned long int, ...), musl/POSIX has ioctl(int, int, ...)

so address this as well

RISCV32 libc does not have these defines so use them from
linux_raw_sys crate

ioctl() signare does not match between musl and glibc
ioctl is called the glibc way with ioctl(int, unsigned long int, ...),
musl/POSIX has ioctl(int, int, ...)

so address this as well
@sunfishcode
Copy link
Member

Thanks for the PR! However, I think in this case it's better to just fix the upstream libc crate to define these constants on riscv32. I've now submitted rust-lang/libc#4382 to do this. When I build rustix with a libc with that patch on riscv32gc-unknown-linux-gnu, it builds without any other modifications.

@sunfishcode
Copy link
Member

rust-lang/libc#4382 is now landed, backported, and released in libc 0.2.172. I believe this fixes the underlying issue here; please file new issues if there are any further issues!

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