siginfo: In the struct used to access sifields, don't name the first 3 fields

The first 3 fields of `siginfo_t` have different orders on MIPS. When
casting `siginfo_t` to a different type to access the fields of the
`sifields` union, avoid giving names to the first three fields, since
they're only present for memory layout and shouldn't be accessed from
the casted structure type.
This commit is contained in:
Josh Triplett 2020-08-10 20:16:50 -07:00
parent 13d0cdb68f
commit e3bce7511b
1 changed files with 1 additions and 3 deletions

View File

@ -336,9 +336,7 @@ cfg_if! {
// sifields vary on 32-bit and 64-bit architectures.
#[repr(C)]
struct siginfo_f {
_si_signo: ::c_int,
_si_errno: ::c_int,
_si_code: ::c_int,
_siginfo_base: [::c_int; 3],
sifields: sifields,
}