@@ -11,6 +11,7 @@ use std::str::FromStr;
11
11
#[ cfg( any( target_os = "dragonfly" , target_os = "freebsd" ) ) ]
12
12
use std:: os:: unix:: io:: RawFd ;
13
13
use std:: ptr;
14
+ use cfg_if:: cfg_if;
14
15
15
16
#[ cfg( not( any( target_os = "openbsd" , target_os = "redox" ) ) ) ]
16
17
#[ cfg( any( feature = "aio" , feature = "signal" ) ) ]
@@ -420,10 +421,15 @@ pub const SIGPOLL : Signal = SIGIO;
420
421
/// Alias for [`SIGSYS`]
421
422
pub const SIGUNUSED : Signal = SIGSYS ;
422
423
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
+ }
427
433
}
428
434
429
435
#[ cfg( feature = "signal" ) ]
@@ -1046,6 +1052,8 @@ mod sigevent {
1046
1052
SigevNotify :: SigevThreadId { ..} => libc:: SIGEV_THREAD_ID ,
1047
1053
#[ cfg( all( target_os = "linux" , target_env = "gnu" , not( target_arch = "mips" ) ) ) ]
1048
1054
SigevNotify :: SigevThreadId { ..} => libc:: SIGEV_THREAD_ID ,
1055
+ #[ cfg( all( target_os = "linux" , target_env = "uclibc" ) ) ]
1056
+ SigevNotify :: SigevThreadId { ..} => libc:: SIGEV_THREAD_ID ,
1049
1057
#[ cfg( any( all( target_os = "linux" , target_env = "musl" ) , target_arch = "mips" ) ) ]
1050
1058
SigevNotify :: SigevThreadId { ..} => 4 // No SIGEV_THREAD_ID defined
1051
1059
} ;
0 commit comments