@@ -3103,8 +3103,17 @@ impl crate::Socket {
31033103 /// For more information about this option, see [`set_ip_transparent`].
31043104 ///
31053105 /// [`set_ip_transparent`]: Socket::set_ip_transparent
3106- #[ cfg( all( feature = "all" , target_os = "linux" ) ) ]
3107- #[ cfg_attr( docsrs, doc( cfg( all( feature = "all" , target_os = "linux" ) ) ) ) ]
3106+ #[ cfg( all(
3107+ feature = "all" ,
3108+ any( target_os = "android" , target_os = "linux" , target_os = "fuchsia" )
3109+ ) ) ]
3110+ #[ cfg_attr(
3111+ docsrs,
3112+ doc( cfg( all(
3113+ feature = "all" ,
3114+ any( target_os = "android" , target_os = "linux" , target_os = "fuchsia" )
3115+ ) ) )
3116+ ) ]
31083117 pub fn ip_transparent ( & self ) -> io:: Result < bool > {
31093118 unsafe {
31103119 getsockopt :: < c_int > ( self . as_raw ( ) , libc:: IPPROTO_IP , libc:: IP_TRANSPARENT )
@@ -3127,8 +3136,17 @@ impl crate::Socket {
31273136 ///
31283137 /// TProxy redirection with the iptables TPROXY target also
31293138 /// requires that this option be set on the redirected socket.
3130- #[ cfg( all( feature = "all" , target_os = "linux" ) ) ]
3131- #[ cfg_attr( docsrs, doc( cfg( all( feature = "all" , target_os = "linux" ) ) ) ) ]
3139+ #[ cfg( all(
3140+ feature = "all" ,
3141+ any( target_os = "android" , target_os = "linux" , target_os = "fuchsia" )
3142+ ) ) ]
3143+ #[ cfg_attr(
3144+ docsrs,
3145+ doc( cfg( all(
3146+ feature = "all" ,
3147+ any( target_os = "android" , target_os = "linux" , target_os = "fuchsia" )
3148+ ) ) )
3149+ ) ]
31323150 pub fn set_ip_transparent ( & self , transparent : bool ) -> io:: Result < ( ) > {
31333151 unsafe {
31343152 setsockopt (
0 commit comments