Skip to content

Commit 93d43a7

Browse files
authored
introduces FreeBSD's SO_TS_CLOCK into net::sys::socket::sockopt. (#2093)
* introduces FreeBSD's SO_TS_CLOCK into net::sys::socket::sockopt. close GH-2058. * CHANGELOG entry * changes from feedback
1 parent cc73638 commit 93d43a7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
3434
- Added `MSG_WAITFORONE` to `MsgFlags` on Android, Fuchsia, Linux, NetBSD,
3535
FreeBSD, OpenBSD, and Solaris.
3636
([#2014](https://github.com/nix-rust/nix/pull/2014))
37+
- Added `SO_TS_CLOCK` for FreeBSD to `nix::sys::socket::sockopt`.
38+
([#2093](https://github.com/nix-rust/nix/pull/2093))
3739

3840
### Changed
3941

src/sys/socket/sockopt.rs

+10
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,16 @@ sockopt_impl!(
711711
libc::SO_TIMESTAMPNS,
712712
bool
713713
);
714+
#[cfg(target_os = "freebsd")]
715+
sockopt_impl!(
716+
/// Sets a specific timestamp format instead of the classic `SCM_TIMESTAMP`,
717+
/// to follow up after `SO_TIMESTAMP` is set.
718+
TsClock,
719+
Both,
720+
libc::SOL_SOCKET,
721+
libc::SO_TS_CLOCK,
722+
i32
723+
);
714724
#[cfg(any(target_os = "android", target_os = "linux"))]
715725
#[cfg(feature = "net")]
716726
sockopt_impl!(

0 commit comments

Comments
 (0)