@@ -13,7 +13,11 @@ use std::os::unix::io::RawFd;
13
13
use std:: ptr;
14
14
use std:: str:: FromStr ;
15
15
16
- #[ cfg( not( any( target_os = "openbsd" , target_os = "redox" ) ) ) ]
16
+ #[ cfg( not( any(
17
+ target_os = "fuchsia" ,
18
+ target_os = "openbsd" ,
19
+ target_os = "redox"
20
+ ) ) ) ]
17
21
#[ cfg( any( feature = "aio" , feature = "signal" ) ) ]
18
22
pub use self :: sigevent:: * ;
19
23
@@ -979,7 +983,7 @@ pub type type_of_thread_id = libc::pid_t;
979
983
// sigval is actually a union of a int and a void*. But it's never really used
980
984
// as a pointer, because neither libc nor the kernel ever dereference it. nix
981
985
// therefore presents it as an intptr_t, which is how kevent uses it.
982
- #[ cfg( not( any( target_os = "openbsd" , target_os = "redox" ) ) ) ]
986
+ #[ cfg( not( any( target_os = "fuchsia" , target_os = " openbsd", target_os = "redox" ) ) ) ]
983
987
#[ derive( Clone , Copy , Debug , Eq , Hash , PartialEq ) ]
984
988
pub enum SigevNotify {
985
989
/// No notification will be delivered
@@ -1018,7 +1022,11 @@ pub enum SigevNotify {
1018
1022
}
1019
1023
}
1020
1024
1021
- #[ cfg( not( any( target_os = "openbsd" , target_os = "redox" ) ) ) ]
1025
+ #[ cfg( not( any(
1026
+ target_os = "fuchsia" ,
1027
+ target_os = "openbsd" ,
1028
+ target_os = "redox"
1029
+ ) ) ) ]
1022
1030
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
1023
1031
mod sigevent {
1024
1032
feature ! {
@@ -1052,9 +1060,6 @@ mod sigevent {
1052
1060
/// Linux, Solaris, and portable programs should prefer `SIGEV_THREAD_ID` or
1053
1061
/// `SIGEV_SIGNAL`. That field is part of a union that shares space with the
1054
1062
/// more genuinely useful `sigev_notify_thread_id`
1055
- // Allow invalid_value warning on Fuchsia only.
1056
- // See https://github.com/nix-rust/nix/issues/1441
1057
- #[ cfg_attr( target_os = "fuchsia" , allow( invalid_value) ) ]
1058
1063
pub fn new( sigev_notify: SigevNotify ) -> SigEvent {
1059
1064
let mut sev = unsafe { mem:: MaybeUninit :: <libc:: sigevent>:: zeroed( ) . assume_init( ) } ;
1060
1065
sev. sigev_notify = match sigev_notify {
0 commit comments