Skip to content

Commit d5fdacb

Browse files
committed
add TcpRepair to sockopt
1 parent dab7332 commit d5fdacb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
3030
(#[1335](https://github.com/nix-rust/nix/pull/1335))
3131
- Exposed `SockAddr::from_raw_sockaddr`
3232
(#[1447](https://github.com/nix-rust/nix/pull/1447))
33+
- Added `TcpRepair`
34+
(#[1503](https://github.com/nix-rust/nix/pull/1503))
3335

3436
### Changed
3537

src/sys/socket/sockopt.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ sockopt_impl!(Both, TcpKeepAlive, libc::IPPROTO_TCP, libc::TCP_KEEPALIVE, u32);
267267
sockopt_impl!(Both, TcpKeepIdle, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, u32);
268268
#[cfg(not(target_os = "openbsd"))]
269269
sockopt_impl!(Both, TcpKeepCount, libc::IPPROTO_TCP, libc::TCP_KEEPCNT, u32);
270+
#[cfg(any(target_os = "android",
271+
target_os = "fuchsia",
272+
target_os = "linux"))]
273+
sockopt_impl!(Both, TcpRepair, libc::IPPROTO_TCP, libc::TCP_REPAIR, u32);
270274
#[cfg(not(target_os = "openbsd"))]
271275
sockopt_impl!(Both, TcpKeepInterval, libc::IPPROTO_TCP, libc::TCP_KEEPINTVL, u32);
272276
#[cfg(any(target_os = "fuchsia", target_os = "linux"))]

0 commit comments

Comments
 (0)