Skip to content

Commit cc2fa87

Browse files
committed
Allow unused_unsafe for wasi
1 parent 3e02258 commit cc2fa87

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/wasi.rs

+5
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,15 @@ pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
369369
pub const _SC_IOV_MAX: c_int = 60;
370370
pub const _SC_SYMLOOP_MAX: c_int = 173;
371371

372+
// unsafe code here is required in the stable, but not in nightly
373+
#[allow(unused_unsafe)]
372374
pub static CLOCK_MONOTONIC: clockid_t = unsafe { clockid_t(ptr_addr_of!(_CLOCK_MONOTONIC)) };
375+
#[allow(unused_unsafe)]
373376
pub static CLOCK_PROCESS_CPUTIME_ID: clockid_t =
374377
unsafe { clockid_t(ptr_addr_of!(_CLOCK_PROCESS_CPUTIME_ID)) };
378+
#[allow(unused_unsafe)]
375379
pub static CLOCK_REALTIME: clockid_t = unsafe { clockid_t(ptr_addr_of!(_CLOCK_REALTIME)) };
380+
#[allow(unused_unsafe)]
376381
pub static CLOCK_THREAD_CPUTIME_ID: clockid_t =
377382
unsafe { clockid_t(ptr_addr_of!(_CLOCK_THREAD_CPUTIME_ID)) };
378383

0 commit comments

Comments
 (0)