Skip to content

Commit e01f5ae

Browse files
committed
introduces FreeBSD's SO_TS_CLOCK into net::sys::socket::sockopt.
close GH-2058.
1 parent a0613ba commit e01f5ae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sys/socket/sockopt.rs

Lines changed: 10 additions & 0 deletions
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+
SetOnly,
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)