Skip to content

Commit 1f64e8d

Browse files
committed
Test all linux platforms
1 parent 4b6101f commit 1f64e8d

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/sys/socket/mod.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ use libc::{self, c_void, c_int, iovec, socklen_t, size_t,
77
CMSG_FIRSTHDR, CMSG_NXTHDR, CMSG_DATA, CMSG_LEN};
88
use std::{mem, ptr, slice};
99
use std::os::unix::io::RawFd;
10-
#[cfg(all(target_os = "linux", any(
11-
target_arch = "x86_64",
12-
target_arch = "aarch64",
13-
), not(target_env = "musl")))]
10+
#[cfg(all(target_os = "linux"))]
1411
use crate::sys::time::TimeSpec;
1512
use crate::sys::time::TimeVal;
1613
use crate::sys::uio::IoVec;
@@ -562,10 +559,7 @@ pub enum ControlMessageOwned {
562559
/// Nanoseconds resolution timestamp
563560
///
564561
/// [Further reading](https://www.kernel.org/doc/html/latest/networking/timestamping.html)
565-
#[cfg(all(target_os = "linux", any(
566-
target_arch = "x86_64",
567-
target_arch = "aarch64",
568-
), not(target_env = "musl")))]
562+
#[cfg(all(target_os = "linux"))]
569563
ScmTimestampns(TimeSpec),
570564
#[cfg(any(
571565
target_os = "android",
@@ -658,10 +652,7 @@ impl ControlMessageOwned {
658652
let tv: libc::timeval = ptr::read_unaligned(p as *const _);
659653
ControlMessageOwned::ScmTimestamp(TimeVal::from(tv))
660654
},
661-
#[cfg(all(target_os = "linux", any(
662-
target_arch = "x86_64",
663-
target_arch = "aarch64",
664-
), not(target_env = "musl")))]
655+
#[cfg(all(target_os = "linux"))]
665656
(libc::SOL_SOCKET, libc::SCM_TIMESTAMPNS) => {
666657
let ts: libc::timespec = ptr::read_unaligned(p as *const _);
667658
ControlMessageOwned::ScmTimestampns(TimeSpec::from(ts))

src/sys/socket/sockopt.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,7 @@ sockopt_impl!(Both, BindToDevice, libc::SOL_SOCKET, libc::SO_BINDTODEVICE, OsStr
272272
#[cfg(any(target_os = "android", target_os = "linux"))]
273273
sockopt_impl!(GetOnly, OriginalDst, libc::SOL_IP, libc::SO_ORIGINAL_DST, libc::sockaddr_in);
274274
sockopt_impl!(Both, ReceiveTimestamp, libc::SOL_SOCKET, libc::SO_TIMESTAMP, bool);
275-
#[cfg(all(target_os = "linux", any(
276-
target_arch = "x86_64",
277-
target_arch = "aarch64",
278-
), not(target_env = "musl")))]
275+
#[cfg(all(target_os = "linux"))]
279276
sockopt_impl!(Both, ReceiveTimestampns, libc::SOL_SOCKET, libc::SO_TIMESTAMPNS, bool);
280277
#[cfg(any(target_os = "android", target_os = "linux"))]
281278
sockopt_impl!(Both, IpTransparent, libc::SOL_IP, libc::IP_TRANSPARENT, bool);

0 commit comments

Comments
 (0)