@@ -28,7 +28,8 @@ cfg_if::cfg_if! {
28
28
if #[ cfg( any( target_os = "dragonfly" , target_os = "freebsd" ,
29
29
target_os = "ios" , target_os = "macos" ,
30
30
target_os = "openbsd" , target_os = "netbsd" ,
31
- target_os = "solaris" , target_os = "haiku" ) ) ] {
31
+ target_os = "solaris" , target_os = "illumos" ,
32
+ target_os = "haiku" ) ) ] {
32
33
use libc:: IPV6_JOIN_GROUP as IPV6_ADD_MEMBERSHIP ;
33
34
use libc:: IPV6_LEAVE_GROUP as IPV6_DROP_MEMBERSHIP ;
34
35
} else {
@@ -727,15 +728,23 @@ impl Socket {
727
728
}
728
729
}
729
730
730
- #[ cfg( all( unix, not( target_os = "solaris" ) , feature = "reuseport" ) ) ]
731
+ #[ cfg( all(
732
+ unix,
733
+ not( any( target_os = "solaris" , target_os = "illumos" ) ) ,
734
+ feature = "reuseport"
735
+ ) ) ]
731
736
pub fn reuse_port ( & self ) -> io:: Result < bool > {
732
737
unsafe {
733
738
let raw: c_int = self . getsockopt ( libc:: SOL_SOCKET , libc:: SO_REUSEPORT ) ?;
734
739
Ok ( raw != 0 )
735
740
}
736
741
}
737
742
738
- #[ cfg( all( unix, not( target_os = "solaris" ) , feature = "reuseport" ) ) ]
743
+ #[ cfg( all(
744
+ unix,
745
+ not( any( target_os = "solaris" , target_os = "illumos" ) ) ,
746
+ feature = "reuseport"
747
+ ) ) ]
739
748
pub fn set_reuse_port ( & self , reuse : bool ) -> io:: Result < ( ) > {
740
749
unsafe { self . setsockopt ( libc:: SOL_SOCKET , libc:: SO_REUSEPORT , reuse as c_int ) }
741
750
}
0 commit comments