Skip to content

Commit

Permalink
Auto merge of #2776 - cww0614:socks_txtime_mips_musl, r=Amanieu
Browse files Browse the repository at this point in the history
Enable sock_txtime on mips musl target

The struct and related constants were originally added in #2415. But they weren't enabled for mips musl target because the kernel version of the build image was old and they couldn't pass the build. Now the kernel version of the build image is already updated and I think we could enable them for mips musl target
  • Loading branch information
bors committed May 5, 2022
2 parents e53cf4f + 853f70c commit 7b5afd2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
3 changes: 3 additions & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -2070,6 +2070,8 @@ SOF_TIMESTAMPING_SOFTWARE
SOF_TIMESTAMPING_SYS_HARDWARE
SOF_TIMESTAMPING_TX_HARDWARE
SOF_TIMESTAMPING_TX_SOFTWARE
SOF_TXTIME_DEADLINE_MODE
SOF_TXTIME_REPORT_ERRORS
SOL_AAL
SOL_ALG
SOL_ATM
Expand Down Expand Up @@ -3064,6 +3066,7 @@ sigwaitinfo
sock_extended_err
sock_filter
sock_fprog
sock_txtime
sockaddr_alg
sockaddr_can
sockaddr_ll
Expand Down
24 changes: 8 additions & 16 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -685,16 +685,12 @@ 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,
}
}
s_no_extra_traits! {
// linux/net_tstamp.h
#[allow(missing_debug_implementations)]
pub struct sock_txtime {
pub clockid: ::clockid_t,
pub flags: ::__u32,
}
}

Expand Down Expand Up @@ -2664,12 +2660,8 @@ 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;
}
}
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;
Expand Down

0 comments on commit 7b5afd2

Please sign in to comment.