@@ -3103,8 +3103,17 @@ impl crate::Socket {
3103
3103
/// For more information about this option, see [`set_ip_transparent`].
3104
3104
///
3105
3105
/// [`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
+ ) ]
3108
3117
pub fn ip_transparent ( & self ) -> io:: Result < bool > {
3109
3118
unsafe {
3110
3119
getsockopt :: < c_int > ( self . as_raw ( ) , libc:: IPPROTO_IP , libc:: IP_TRANSPARENT )
@@ -3127,8 +3136,17 @@ impl crate::Socket {
3127
3136
///
3128
3137
/// TProxy redirection with the iptables TPROXY target also
3129
3138
/// 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
+ ) ]
3132
3150
pub fn set_ip_transparent ( & self , transparent : bool ) -> io:: Result < ( ) > {
3133
3151
unsafe {
3134
3152
setsockopt (
0 commit comments