Skip to content

Commit

Permalink
Merge pull request #3776 from joboet/ignore_rmx_state
Browse files Browse the repository at this point in the history
Fix CI by ignoring `rmx_state` on Apple platforms
  • Loading branch information
joshtriplett authored Jul 31, 2024
2 parents 043e8a3 + 8367de9 commit 5588db9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,9 @@ fn test_apple(target: &str) {
("ifreq", "ifr_ifru") => true,
("ifkpi", "ifk_data") => true,
("ifconf", "ifc_ifcu") => true,
// FIXME: this field has been incorporated into a resized `rmx_filler` array.
("rt_metrics", "rmx_state") => true,
("rt_metrics", "rmx_filler") => true,
_ => false,
}
});
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,8 @@ s! {
pub rmx_rtt: u32,
pub rmx_rttvar: u32,
pub rmx_pksent: u32,
/// This field does not exist anymore, the u32 is now part of a resized
/// `rmx_filler` array.
pub rmx_state: u32,
pub rmx_filler: [u32; 3],
}
Expand Down
4 changes: 4 additions & 0 deletions src/wasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,14 @@ pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
pub const _SC_IOV_MAX: c_int = 60;
pub const _SC_SYMLOOP_MAX: c_int = 173;

#[allow(unused_unsafe)] // `addr_of!(EXTERN_STATIC)` is now safe; remove `unsafe` when MSRV >= 1.82
pub static CLOCK_MONOTONIC: clockid_t = unsafe { clockid_t(ptr_addr_of!(_CLOCK_MONOTONIC)) };
#[allow(unused_unsafe)]
pub static CLOCK_PROCESS_CPUTIME_ID: clockid_t =
unsafe { clockid_t(ptr_addr_of!(_CLOCK_PROCESS_CPUTIME_ID)) };
#[allow(unused_unsafe)]
pub static CLOCK_REALTIME: clockid_t = unsafe { clockid_t(ptr_addr_of!(_CLOCK_REALTIME)) };
#[allow(unused_unsafe)]
pub static CLOCK_THREAD_CPUTIME_ID: clockid_t =
unsafe { clockid_t(ptr_addr_of!(_CLOCK_THREAD_CPUTIME_ID)) };

Expand Down

0 comments on commit 5588db9

Please sign in to comment.