@@ -11,6 +11,7 @@ use std::str::FromStr;
1111#[ cfg( any( target_os = "dragonfly" , target_os = "freebsd" ) ) ]
1212use std:: os:: unix:: io:: RawFd ;
1313use std:: ptr;
14+ use cfg_if:: cfg_if;
1415
1516#[ cfg( not( any( target_os = "openbsd" , target_os = "redox" ) ) ) ]
1617#[ cfg( any( feature = "aio" , feature = "signal" ) ) ]
@@ -420,10 +421,15 @@ pub const SIGPOLL : Signal = SIGIO;
420421/// Alias for [`SIGSYS`]
421422pub const SIGUNUSED : Signal = SIGSYS ;
422423
423- #[ cfg( not( target_os = "redox" ) ) ]
424- type SaFlags_t = libc:: c_int;
425- #[ cfg( target_os = "redox" ) ]
426- type SaFlags_t = libc:: c_ulong;
424+ cfg_if! {
425+ if #[ cfg( target_os = "redox" ) ] {
426+ type SaFlags_t = libc:: c_ulong;
427+ } else if #[ cfg( target_env = "uclibc" ) ] {
428+ type SaFlags_t = libc:: c_ulong;
429+ } else {
430+ type SaFlags_t = libc:: c_int;
431+ }
432+ }
427433}
428434
429435#[ cfg( feature = "signal" ) ]
@@ -1046,6 +1052,8 @@ mod sigevent {
10461052 SigevNotify :: SigevThreadId { ..} => libc:: SIGEV_THREAD_ID ,
10471053 #[ cfg( all( target_os = "linux" , target_env = "gnu" , not( target_arch = "mips" ) ) ) ]
10481054 SigevNotify :: SigevThreadId { ..} => libc:: SIGEV_THREAD_ID ,
1055+ #[ cfg( all( target_os = "linux" , target_env = "uclibc" ) ) ]
1056+ SigevNotify :: SigevThreadId { ..} => libc:: SIGEV_THREAD_ID ,
10491057 #[ cfg( any( all( target_os = "linux" , target_env = "musl" ) , target_arch = "mips" ) ) ]
10501058 SigevNotify :: SigevThreadId { ..} => 4 // No SIGEV_THREAD_ID defined
10511059 } ;
0 commit comments