@@ -586,7 +586,7 @@ pub unsafe fn brk(addr: *mut c_void) -> io::Result<*mut c_void> {
586586///
587587/// See [`sigrt`] for a convenient way to construct `SIGRTMIN + n` values.
588588#[ cfg( linux_raw) ]
589- pub const SIGRTMIN : u32 = linux_raw_sys:: general:: SIGRTMIN ;
589+ pub const SIGRTMIN : i32 = linux_raw_sys:: general:: SIGRTMIN as i32 ;
590590
591591/// `SIGRTMAX`—The last of the raw OS “real-time” signal range.
592592///
@@ -595,7 +595,7 @@ pub const SIGRTMIN: u32 = linux_raw_sys::general::SIGRTMIN;
595595/// won't share a process with a libc (perhaps because you yourself are
596596/// implementing a libc).
597597#[ cfg( linux_raw) ]
598- pub const SIGRTMAX : u32 = {
598+ pub const SIGRTMAX : i32 = {
599599 // Use the actual `SIGRTMAX` value on platforms which define it.
600600 #[ cfg( not( any(
601601 target_arch = "arm" ,
@@ -604,7 +604,7 @@ pub const SIGRTMAX: u32 = {
604604 target_arch = "x86_64" ,
605605 ) ) ) ]
606606 {
607- linux_raw_sys:: general:: SIGRTMAX
607+ linux_raw_sys:: general:: SIGRTMAX as i32
608608 }
609609
610610 // On platforms that don't, derive it from `_NSIG`.
@@ -615,7 +615,7 @@ pub const SIGRTMAX: u32 = {
615615 target_arch = "x86_64" ,
616616 ) ) ]
617617 {
618- linux_raw_sys:: general:: _NSIG - 1
618+ linux_raw_sys:: general:: _NSIG as i32 - 1
619619 }
620620} ;
621621
@@ -627,14 +627,14 @@ pub const SIGRTMAX: u32 = {
627627/// implementing a libc).
628628#[ cfg( linux_raw) ]
629629#[ doc( alias = "SIGRTMIN" ) ]
630- pub fn sigrt ( n : u32 ) -> Option < Signal > {
630+ pub fn sigrt ( n : i32 ) -> Option < Signal > {
631631 let sig = SIGRTMIN . wrapping_add ( n) ;
632632 if ( SIGRTMIN ..=SIGRTMAX ) . contains ( & sig) {
633633 // SAFETY: We've checked that `sig` is in the expected range. It could
634634 // still conflict with libc's reserved values, however users of the
635635 // `runtime` module here must already know that there's no other libc
636636 // to conflict with.
637- Some ( unsafe { Signal :: from_raw_unchecked ( sig as i32 ) } )
637+ Some ( unsafe { Signal :: from_raw_unchecked ( sig) } )
638638 } else {
639639 None
640640 }
0 commit comments