Skip to content

Commit 5588db9

Browse files
authored
Merge pull request #3776 from joboet/ignore_rmx_state
Fix CI by ignoring `rmx_state` on Apple platforms
2 parents 043e8a3 + 8367de9 commit 5588db9

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ fn test_apple(target: &str) {
408408
("ifreq", "ifr_ifru") => true,
409409
("ifkpi", "ifk_data") => true,
410410
("ifconf", "ifc_ifcu") => true,
411+
// FIXME: this field has been incorporated into a resized `rmx_filler` array.
412+
("rt_metrics", "rmx_state") => true,
413+
("rt_metrics", "rmx_filler") => true,
411414
_ => false,
412415
}
413416
});

src/unix/bsd/apple/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,8 @@ s! {
509509
pub rmx_rtt: u32,
510510
pub rmx_rttvar: u32,
511511
pub rmx_pksent: u32,
512+
/// This field does not exist anymore, the u32 is now part of a resized
513+
/// `rmx_filler` array.
512514
pub rmx_state: u32,
513515
pub rmx_filler: [u32; 3],
514516
}

src/wasi.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,14 @@ pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
366366
pub const _SC_IOV_MAX: c_int = 60;
367367
pub const _SC_SYMLOOP_MAX: c_int = 173;
368368

369+
#[allow(unused_unsafe)] // `addr_of!(EXTERN_STATIC)` is now safe; remove `unsafe` when MSRV >= 1.82
369370
pub static CLOCK_MONOTONIC: clockid_t = unsafe { clockid_t(ptr_addr_of!(_CLOCK_MONOTONIC)) };
371+
#[allow(unused_unsafe)]
370372
pub static CLOCK_PROCESS_CPUTIME_ID: clockid_t =
371373
unsafe { clockid_t(ptr_addr_of!(_CLOCK_PROCESS_CPUTIME_ID)) };
374+
#[allow(unused_unsafe)]
372375
pub static CLOCK_REALTIME: clockid_t = unsafe { clockid_t(ptr_addr_of!(_CLOCK_REALTIME)) };
376+
#[allow(unused_unsafe)]
373377
pub static CLOCK_THREAD_CPUTIME_ID: clockid_t =
374378
unsafe { clockid_t(ptr_addr_of!(_CLOCK_THREAD_CPUTIME_ID)) };
375379

0 commit comments

Comments
 (0)