libc icon indicating copy to clipboard operation
libc copied to clipboard

Fix the definition of sigevent on FreeBSD and Linux

Open asomers opened this issue 1 year ago • 4 comments

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.

asomers avatar Mar 23 '24 15:03 asomers

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

rustbot avatar Mar 23 '24 15:03 rustbot

Failed on musl: https://github.com/rust-lang/libc/actions/runs/8846424497/job/24292411184?pr=3630

JohnTitor avatar May 01 '24 15:05 JohnTitor

@JohnTitor I fixed the build failure on musl and rebased on main

asomers avatar May 13 '24 16:05 asomers

The Sparc failure is not due to this PR.

asomers avatar May 13 '24 19:05 asomers

Considering the main branch is for version 1.0, which allows breaking changes, I think we can move this forward.

SteveLauC avatar Aug 11 '24 07:08 SteveLauC