File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -269,10 +269,7 @@ s_no_extra_traits! {
269269 // Can't correctly impl Debug for unions
270270 #[ allow( missing_debug_implementations) ]
271271 pub union __c_anonymous_sigev_un {
272- #[ cfg( target_pointer_width = "64" ) ]
273- _pad: [ :: c_int; ( 64 - 2 * 4 - 8 ) / 4 ] ,
274- #[ cfg( target_pointer_width = "32" ) ]
275- _pad: [ :: c_int; ( 64 - 2 * 4 - 4 ) / 4 ] ,
272+ _pad: [ :: c_int; SIGEV_PAD_SIZE ] ,
276273 pub _tid: :: c_int,
277274 pub _sigev_thread: __c_anonymous_sigev_thread,
278275 }
@@ -576,6 +573,13 @@ pub const SIGPIPE: ::c_int = 13;
576573pub const SIGALRM : :: c_int = 14 ;
577574pub const SIGTERM : :: c_int = 15 ;
578575
576+ const SIGEV_MAX_SIZE : usize = 64 ;
577+ #[ cfg( target_pointer_width = "64" ) ]
578+ const __ARCH_SIGEV_PREAMBLE_SIZE: usize = 4 * 2 + 8 ;
579+ #[ cfg( target_pointer_width = "32" ) ]
580+ const __ARCH_SIGEV_PREAMBLE_SIZE: usize = 4 * 2 + 4 ;
581+ const SIGEV_PAD_SIZE : usize = ( SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / 4 ;
582+
579583pub const PROT_NONE : :: c_int = 0 ;
580584pub const PROT_READ : :: c_int = 1 ;
581585pub const PROT_WRITE : :: c_int = 2 ;
You can’t perform that action at this time.
0 commit comments