Skip to content

Commit e3bce75

Browse files
committed
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.
1 parent 13d0cdb commit e3bce75

File tree

1 file changed

+1
-3
lines changed
  • src/unix/linux_like/linux/gnu

1 file changed

+1
-3
lines changed

src/unix/linux_like/linux/gnu/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,7 @@ cfg_if! {
336336
// sifields vary on 32-bit and 64-bit architectures.
337337
#[repr(C)]
338338
struct siginfo_f {
339-
_si_signo: ::c_int,
340-
_si_errno: ::c_int,
341-
_si_code: ::c_int,
339+
_siginfo_base: [::c_int; 3],
342340
sifields: sifields,
343341
}
344342

0 commit comments

Comments
 (0)