Skip to content

Commit

Permalink
introduces FreeBSD's SO_TS_CLOCK into net::sys::socket::sockopt. (#2093)
Browse files Browse the repository at this point in the history
* introduces FreeBSD's SO_TS_CLOCK into net::sys::socket::sockopt.

close GH-2058.

* CHANGELOG entry

* changes from feedback
  • Loading branch information
devnexen authored Aug 26, 2023
1 parent cc73638 commit 93d43a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Added `MSG_WAITFORONE` to `MsgFlags` on Android, Fuchsia, Linux, NetBSD,
FreeBSD, OpenBSD, and Solaris.
([#2014](https://github.com/nix-rust/nix/pull/2014))
- Added `SO_TS_CLOCK` for FreeBSD to `nix::sys::socket::sockopt`.
([#2093](https://github.com/nix-rust/nix/pull/2093))

### Changed

Expand Down
10 changes: 10 additions & 0 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,16 @@ sockopt_impl!(
libc::SO_TIMESTAMPNS,
bool
);
#[cfg(target_os = "freebsd")]
sockopt_impl!(
/// Sets a specific timestamp format instead of the classic `SCM_TIMESTAMP`,
/// to follow up after `SO_TIMESTAMP` is set.
TsClock,
Both,
libc::SOL_SOCKET,
libc::SO_TS_CLOCK,
i32
);
#[cfg(any(target_os = "android", target_os = "linux"))]
#[cfg(feature = "net")]
sockopt_impl!(
Expand Down

0 comments on commit 93d43a7

Please sign in to comment.