libc
libc copied to clipboard
Fix the definition of sigevent on FreeBSD and Linux
It was originally defined back before rust could represent C unions. So instead of defining the union field correctly, it simply defined that union's most useful field. Define it correctly now.
Remove traits that can't be safely implemented on a union: PartialEq, Eq, and Hash. Define Debug, but exclude the union field. Leave Clone in place.
This PR is a rebase of #2813 that eschews all of the backwards-compatibility parts.
r? @JohnTitor
rustbot has assigned @JohnTitor. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
Failed on musl: https://github.com/rust-lang/libc/actions/runs/8846424497/job/24292411184?pr=3630
@JohnTitor I fixed the build failure on musl and rebased on main
The Sparc failure is not due to this PR.
Considering the main branch is for version 1.0, which allows breaking changes, I think we can move this forward.