File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ pub(crate) type Bool = c_int;
137
137
138
138
#[ cfg( target_vendor = "apple" ) ]
139
139
use libc:: TCP_KEEPALIVE as KEEPALIVE_TIME ;
140
- #[ cfg( not( any( target_vendor = "apple" ) ) ) ]
140
+ #[ cfg( not( any( target_vendor = "apple" , target_os = "haiku" , target_os = "openbsd" ) ) ) ]
141
141
use libc:: TCP_KEEPIDLE as KEEPALIVE_TIME ;
142
142
143
143
/// Helper macro to execute a system call that returns an `io::Result`.
@@ -873,6 +873,7 @@ pub(crate) fn keepalive_time(fd: Socket) -> io::Result<Duration> {
873
873
}
874
874
}
875
875
876
+ #[ allow( unused_variables) ]
876
877
pub ( crate ) fn set_tcp_keepalive ( fd : Socket , keepalive : & TcpKeepalive ) -> io:: Result < ( ) > {
877
878
#[ cfg( not( any( target_os = "haiku" , target_os = "openbsd" ) ) ) ]
878
879
if let Some ( time) = keepalive. time {
@@ -904,6 +905,7 @@ pub(crate) fn set_tcp_keepalive(fd: Socket, keepalive: &TcpKeepalive) -> io::Res
904
905
Ok ( ( ) )
905
906
}
906
907
908
+ #[ cfg( not( any( target_os = "haiku" , target_os = "openbsd" ) ) ) ]
907
909
fn into_secs ( duration : Duration ) -> c_int {
908
910
min ( duration. as_secs ( ) , c_int:: max_value ( ) as u64 ) as c_int
909
911
}
You can’t perform that action at this time.
0 commit comments