Skip to content

Commit e883afc

Browse files
alexcrichtontgross35
authored andcommitted
Remove nonexistent clocks on WASI
These were added way back when in #2499 and while they may have existed in a historical version of wasi-libc they most certainly do not exist in the current wasi-libc. Any usage of them is already-breaking, so this deletes these items.
1 parent d06928f commit e883afc

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/wasi/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,7 @@ pub const _SC_SYMLOOP_MAX: c_int = 173;
407407
#[allow(unused_unsafe)]
408408
pub static CLOCK_MONOTONIC: clockid_t = unsafe { clockid_t(core::ptr::addr_of!(_CLOCK_MONOTONIC)) };
409409
#[allow(unused_unsafe)]
410-
pub static CLOCK_PROCESS_CPUTIME_ID: clockid_t =
411-
unsafe { clockid_t(core::ptr::addr_of!(_CLOCK_PROCESS_CPUTIME_ID)) };
412-
#[allow(unused_unsafe)]
413410
pub static CLOCK_REALTIME: clockid_t = unsafe { clockid_t(core::ptr::addr_of!(_CLOCK_REALTIME)) };
414-
#[allow(unused_unsafe)]
415-
pub static CLOCK_THREAD_CPUTIME_ID: clockid_t =
416-
unsafe { clockid_t(core::ptr::addr_of!(_CLOCK_THREAD_CPUTIME_ID)) };
417411

418412
pub const ABDAY_1: crate::nl_item = 0x20000;
419413
pub const ABDAY_2: crate::nl_item = 0x20001;
@@ -586,9 +580,7 @@ extern "C" {
586580
pub fn ctime_r(a: *const time_t, b: *mut c_char) -> *mut c_char;
587581

588582
static _CLOCK_MONOTONIC: u8;
589-
static _CLOCK_PROCESS_CPUTIME_ID: u8;
590583
static _CLOCK_REALTIME: u8;
591-
static _CLOCK_THREAD_CPUTIME_ID: u8;
592584
pub fn nanosleep(a: *const timespec, b: *mut timespec) -> c_int;
593585
pub fn clock_getres(a: clockid_t, b: *mut timespec) -> c_int;
594586
pub fn clock_gettime(a: clockid_t, b: *mut timespec) -> c_int;

0 commit comments

Comments
 (0)