diff options
author | bors <bors@rust-lang.org> | 2021-10-12 00:06:47 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2021-10-12 00:06:47 +0000 |
commit | 032d105348914d1d0c325512ae9ce551311180b4 (patch) | |
tree | afce7bb5732c281a8d03cf9af1cc0b8a05313a9b | |
parent | ee0c4f5d63493e4ac7e4e4bf209b6933945e2245 (diff) | |
parent | 07e5721f26fd3682ba32ddab1d78390be676635e (diff) | |
download | rust-libc-032d105348914d1d0c325512ae9ce551311180b4.tar.gz |
Auto merge of #2415 - ghedo:sock_txtime, r=JohnTitor
Add struct sock_txtime and related flags
These are needed to use the SO_TXTIME socket option on Linux, which is
already exposed.
-rw-r--r-- | src/unix/linux_like/linux/mod.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index e10a310a2e..2630942bd4 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -671,6 +671,19 @@ s_no_extra_traits! { } cfg_if! { + if #[cfg(not(all(target_env = "musl", target_arch = "mips")))] { + s_no_extra_traits! { + // linux/net_tstamp.h + #[allow(missing_debug_implementations)] + pub struct sock_txtime { + pub clockid: ::clockid_t, + pub flags: ::__u32, + } + } + } +} + +cfg_if! { if #[cfg(libc_union)] { s_no_extra_traits! { // linux/can.h @@ -2528,6 +2541,12 @@ pub const SOF_TIMESTAMPING_RX_SOFTWARE: ::c_uint = 1 << 3; pub const SOF_TIMESTAMPING_SOFTWARE: ::c_uint = 1 << 4; pub const SOF_TIMESTAMPING_SYS_HARDWARE: ::c_uint = 1 << 5; pub const SOF_TIMESTAMPING_RAW_HARDWARE: ::c_uint = 1 << 6; +cfg_if! { + if #[cfg(not(all(target_env = "musl", target_arch = "mips")))] { + pub const SOF_TXTIME_DEADLINE_MODE: u32 = 1 << 0; + pub const SOF_TXTIME_REPORT_ERRORS: u32 = 1 << 1; + } +} // linux/if_alg.h pub const ALG_SET_KEY: ::c_int = 1; |