@@ -7,7 +7,7 @@ use libc::{self, c_void, c_int, iovec, socklen_t, size_t,
7
7
CMSG_FIRSTHDR , CMSG_NXTHDR , CMSG_DATA , CMSG_LEN } ;
8
8
use std:: { mem, ptr, slice} ;
9
9
use std:: os:: unix:: io:: RawFd ;
10
- #[ cfg( target_os = "linux" ) ]
10
+ #[ cfg( all ( target_os = "linux" , any ( target_arch = "x86_64" , target_arch = "x86" ) , target_env = "gnu" ) ) ]
11
11
use crate :: sys:: time:: TimeSpec ;
12
12
use crate :: sys:: time:: TimeVal ;
13
13
use crate :: sys:: uio:: IoVec ;
@@ -547,7 +547,7 @@ pub enum ControlMessageOwned {
547
547
/// Nanoseconds resolution timestamp
548
548
///
549
549
/// [Further reading](https://www.kernel.org/doc/html/latest/networking/timestamping.html)
550
- #[ cfg( target_os = "linux" ) ]
550
+ #[ cfg( all ( target_os = "linux" , any ( target_arch = "x86_64" , target_arch = "x86" ) , target_env = "gnu" ) ) ]
551
551
ScmTimestampNs ( TimeSpec ) ,
552
552
#[ cfg( any(
553
553
target_os = "android" ,
@@ -640,7 +640,7 @@ impl ControlMessageOwned {
640
640
let tv: libc:: timeval = ptr:: read_unaligned ( p as * const _ ) ;
641
641
ControlMessageOwned :: ScmTimestamp ( TimeVal :: from ( tv) )
642
642
} ,
643
- #[ cfg( target_os = "linux" ) ]
643
+ #[ cfg( all ( target_os = "linux" , any ( target_arch = "x86_64" , target_arch = "x86" ) , target_env = "gnu" ) ) ]
644
644
( libc:: SOL_SOCKET , libc:: SCM_TIMESTAMPNS ) => {
645
645
let ts: libc:: timespec = ptr:: read_unaligned ( p as * const _ ) ;
646
646
ControlMessageOwned :: ScmTimestampNs ( TimeSpec :: from ( ts) )
0 commit comments