File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -202,15 +202,19 @@ impl TcpStream {
202202 setsockopt ( & self . inner , libc:: IPPROTO_TCP , libc:: TCP_KEEPALIVE ,
203203 seconds as c_int )
204204 }
205- #[ cfg( any( target_os = "freebsd" , target_os = "dragonfly" ) ) ]
205+ #[ cfg( any( target_os = "freebsd" ,
206+ target_os = "dragonfly" ,
207+ target_os = "linux" ) ) ]
206208 fn set_tcp_keepalive ( & self , seconds : u32 ) -> io:: Result < ( ) > {
207209 setsockopt ( & self . inner , libc:: IPPROTO_TCP , libc:: TCP_KEEPIDLE ,
208210 seconds as c_int )
209211 }
212+
210213 #[ cfg( not( any( target_os = "macos" ,
211214 target_os = "ios" ,
212215 target_os = "freebsd" ,
213- target_os = "dragonfly" ) ) ) ]
216+ target_os = "dragonfly" ,
217+ target_os = "linux" ) ) ) ]
214218 fn set_tcp_keepalive ( & self , _seconds : u32 ) -> io:: Result < ( ) > {
215219 Ok ( ( ) )
216220 }
You can’t perform that action at this time.
0 commit comments