Skip to content
Snippets Groups Projects
Verified Commit 64849c7d authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix types for 32-bit systems

parent e2fd33db
No related branches found
No related tags found
No related merge requests found
......@@ -259,9 +259,9 @@ pub extern "C" fn sigpending(set: *mut sigset_t) -> c_int {
Sys::sigpending(set)
}
const BELOW_SIGRTMIN_MASK: u64 = (1 << SIGRTMIN) - 1;
const STANDARD_SIG_MASK: u64 = (1 << 32) - 1;
const RLCT_SIGNAL_MASK: u64 = BELOW_SIGRTMIN_MASK & !STANDARD_SIG_MASK;
const BELOW_SIGRTMIN_MASK: c_ulong = (1 << SIGRTMIN) - 1;
const STANDARD_SIG_MASK: c_ulong = (1 << 32) - 1;
const RLCT_SIGNAL_MASK: c_ulong = BELOW_SIGRTMIN_MASK & !STANDARD_SIG_MASK;
#[no_mangle]
pub unsafe extern "C" fn sigprocmask(how: c_int, set: *const sigset_t, oset: *mut sigset_t) -> c_int {
......
......@@ -29,12 +29,12 @@ impl timespec {
Some(if later_nsec > earlier_nsec {
timespec {
tv_sec: later.tv_sec.checked_sub(earlier.tv_sec)?,
tv_nsec: (later_nsec - earlier_nsec) as i64,
tv_nsec: (later_nsec - earlier_nsec) as c_long,
}
} else {
timespec {
tv_sec: later.tv_sec.checked_sub(earlier.tv_sec)?.checked_sub(1)?,
tv_nsec: 1_000_000_000 - (earlier_nsec - later_nsec) as i64,
tv_nsec: 1_000_000_000 - (earlier_nsec - later_nsec) as c_long,
}
})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment