Skip to content

Commit 15b1987

Browse files
committed
Draft for arch support
1 parent d71a003 commit 15b1987

File tree

3 files changed

+0
-6
lines changed

3 files changed

+0
-6
lines changed

src/sys/socket/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ 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(target_arch = "x86_64", target_arch = "x86"), target_env = "gnu"))]
1110
use crate::sys::time::TimeSpec;
1211
use crate::sys::time::TimeVal;
1312
use crate::sys::uio::IoVec;
@@ -561,7 +560,6 @@ pub enum ControlMessageOwned {
561560
/// Nanoseconds resolution timestamp
562561
///
563562
/// [Further reading](https://www.kernel.org/doc/html/latest/networking/timestamping.html)
564-
#[cfg(all(target_os = "linux", any(target_arch = "x86_64", target_arch = "x86"), target_env = "gnu"))]
565563
ScmTimestampNs(TimeSpec),
566564
#[cfg(any(
567565
target_os = "android",
@@ -654,7 +652,6 @@ impl ControlMessageOwned {
654652
let tv: libc::timeval = ptr::read_unaligned(p as *const _);
655653
ControlMessageOwned::ScmTimestamp(TimeVal::from(tv))
656654
},
657-
#[cfg(all(target_os = "linux", any(target_arch = "x86_64", target_arch = "x86"), target_env = "gnu"))]
658655
(libc::SOL_SOCKET, libc::SCM_TIMESTAMPNS) => {
659656
let ts: libc::timespec = ptr::read_unaligned(p as *const _);
660657
ControlMessageOwned::ScmTimestampNs(TimeSpec::from(ts))

src/sys/socket/sockopt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ 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(target_arch = "x86_64", target_arch = "x86"), target_env = "gnu"))]
276275
sockopt_impl!(Both, ReceiveTimestampNs, libc::SOL_SOCKET, libc::SO_TIMESTAMPNS, bool);
277276
#[cfg(any(target_os = "android", target_os = "linux"))]
278277
sockopt_impl!(Both, IpTransparent, libc::SOL_IP, libc::IP_TRANSPARENT, bool);

test/sys/test_socket.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,6 @@ pub fn test_vsock() {
15361536
thr.join().unwrap();
15371537
}
15381538

1539-
#[cfg(all(target_os = "linux", any(target_arch = "x86_64", target_arch = "x86"), target_env = "gnu"))]
15401539
#[test]
15411540
fn test_recvmsg_timestampns() {
15421541
use nix::sys::socket::*;
@@ -1584,7 +1583,6 @@ fn test_recvmsg_timestampns() {
15841583
nix::unistd::close(in_socket).unwrap();
15851584
}
15861585

1587-
#[cfg(all(target_os = "linux", any(target_arch = "x86_64", target_arch = "x86"), target_env = "gnu"))]
15881586
#[test]
15891587
fn test_recvmmsg_timestampns() {
15901588
use nix::sys::socket::*;

0 commit comments

Comments
 (0)