Skip to content

Commit 7cab925

Browse files
authoredMar 5, 2025··
Don't build the clockid module on x86. (#1382)
Enabling clockid unconditionally on x86 was a workaround that is no longer needed.
1 parent baf65b1 commit 7cab925

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
 

‎src/backend/linux_raw/c.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,13 @@ pub(crate) const CLOCK_THREAD_CPUTIME_ID: c_int =
305305
linux_raw_sys::general::CLOCK_THREAD_CPUTIME_ID as _;
306306
pub(crate) const CLOCK_PROCESS_CPUTIME_ID: c_int =
307307
linux_raw_sys::general::CLOCK_PROCESS_CPUTIME_ID as _;
308-
#[cfg(any(feature = "thread", feature = "time", target_arch = "x86"))]
308+
#[cfg(any(feature = "thread", feature = "time"))]
309309
pub(crate) const CLOCK_BOOTTIME: c_int = linux_raw_sys::general::CLOCK_BOOTTIME as _;
310-
#[cfg(any(feature = "thread", feature = "time", target_arch = "x86"))]
310+
#[cfg(any(feature = "thread", feature = "time"))]
311311
pub(crate) const CLOCK_BOOTTIME_ALARM: c_int = linux_raw_sys::general::CLOCK_BOOTTIME_ALARM as _;
312-
#[cfg(any(feature = "thread", feature = "time", target_arch = "x86"))]
312+
#[cfg(any(feature = "thread", feature = "time"))]
313313
pub(crate) const CLOCK_TAI: c_int = linux_raw_sys::general::CLOCK_TAI as _;
314-
#[cfg(any(feature = "thread", feature = "time", target_arch = "x86"))]
314+
#[cfg(any(feature = "thread", feature = "time"))]
315315
pub(crate) const CLOCK_REALTIME_ALARM: c_int = linux_raw_sys::general::CLOCK_REALTIME_ALARM as _;
316316

317317
#[cfg(feature = "system")]

‎src/backend/linux_raw/conv.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use super::io::errno::{
3030
use super::reg::{raw_arg, ArgNumber, ArgReg, RetReg, R0};
3131
#[cfg(feature = "time")]
3232
use super::time::types::TimerfdClockId;
33-
#[cfg(any(feature = "thread", feature = "time", target_arch = "x86"))]
33+
#[cfg(any(feature = "thread", feature = "time"))]
3434
use crate::clockid::ClockId;
3535
use crate::fd::OwnedFd;
3636
use crate::ffi::CStr;
@@ -44,7 +44,7 @@ use crate::signal::Signal;
4444
use crate::utils::{as_mut_ptr, as_ptr};
4545
use core::mem::MaybeUninit;
4646
use core::ptr::null_mut;
47-
#[cfg(any(feature = "thread", feature = "time", target_arch = "x86"))]
47+
#[cfg(any(feature = "thread", feature = "time"))]
4848
use linux_raw_sys::general::__kernel_clockid_t;
4949
#[cfg(target_pointer_width = "64")]
5050
use linux_raw_sys::general::__kernel_loff_t;
@@ -270,7 +270,7 @@ pub(super) fn loff_t_from_u64<'a, Num: ArgNumber>(i: u64) -> ArgReg<'a, Num> {
270270
pass_usize(i as usize)
271271
}
272272

273-
#[cfg(any(feature = "thread", feature = "time", target_arch = "x86"))]
273+
#[cfg(any(feature = "thread", feature = "time"))]
274274
impl<'a, Num: ArgNumber> From<ClockId> for ArgReg<'a, Num> {
275275
#[inline]
276276
fn from(i: ClockId) -> Self {

‎src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ pub(crate) mod path;
347347

348348
// Private modules used by multiple public modules.
349349
#[cfg(not(any(windows, target_os = "espidf")))]
350-
#[cfg(any(feature = "thread", feature = "time", target_arch = "x86"))]
350+
#[cfg(any(feature = "thread", feature = "time"))]
351351
mod clockid;
352352
#[cfg(linux_kernel)]
353353
#[cfg(any(feature = "io_uring", feature = "runtime"))]

0 commit comments

Comments
 (0)
Please sign in to comment.