62 lines
2.3 KiB
Diff
62 lines
2.3 KiB
Diff
|
--- a/third_party/rust/audio_thread_priority/src/rt_linux.rs
|
||
|
+++ b/third_party/rust/audio_thread_priority/src/rt_linux.rs
|
||
|
@@ -112,7 +112,7 @@
|
||
|
|
||
|
/// Returns the maximum priority, maximum real-time time slice, and the current real-time time
|
||
|
/// slice for this process.
|
||
|
-fn get_limits() -> Result<(i64, u64, libc::rlimit64), AudioThreadPriorityError> {
|
||
|
+fn get_limits() -> Result<(i64, u64, libc::rlimit), AudioThreadPriorityError> {
|
||
|
let c = Connection::get_private(BusType::System)?;
|
||
|
|
||
|
let p = Props::new(
|
||
|
@@ -122,7 +122,7 @@
|
||
|
"org.freedesktop.RealtimeKit1",
|
||
|
DBUS_SOCKET_TIMEOUT,
|
||
|
);
|
||
|
- let mut current_limit = libc::rlimit64 {
|
||
|
+ let mut current_limit = libc::rlimit {
|
||
|
rlim_cur: 0,
|
||
|
rlim_max: 0,
|
||
|
};
|
||
|
@@ -141,9 +141,9 @@
|
||
|
));
|
||
|
}
|
||
|
|
||
|
- if unsafe { libc::getrlimit64(libc::RLIMIT_RTTIME, &mut current_limit) } < 0 {
|
||
|
+ if unsafe { libc::getrlimit(libc::RLIMIT_RTTIME, &mut current_limit) } < 0 {
|
||
|
return Err(AudioThreadPriorityError::new_with_inner(
|
||
|
- "getrlimit64",
|
||
|
+ "getrlimit",
|
||
|
Box::new(OSError::last_os_error()),
|
||
|
));
|
||
|
}
|
||
|
@@ -154,13 +154,13 @@
|
||
|
fn set_limits(request: u64, max: u64) -> Result<(), AudioThreadPriorityError> {
|
||
|
// Set a soft limit to the limit requested, to be able to handle going over the limit using
|
||
|
// SIGXCPU. Set the hard limit to the maxium slice to prevent getting SIGKILL.
|
||
|
- let new_limit = libc::rlimit64 {
|
||
|
+ let new_limit = libc::rlimit {
|
||
|
rlim_cur: request,
|
||
|
rlim_max: max,
|
||
|
};
|
||
|
- if unsafe { libc::setrlimit64(libc::RLIMIT_RTTIME, &new_limit) } < 0 {
|
||
|
+ if unsafe { libc::setrlimit(libc::RLIMIT_RTTIME, &new_limit) } < 0 {
|
||
|
return Err(AudioThreadPriorityError::new_with_inner(
|
||
|
- "setrlimit64",
|
||
|
+ "setrlimit",
|
||
|
Box::new(OSError::last_os_error()),
|
||
|
));
|
||
|
}
|
||
|
@@ -296,9 +296,9 @@
|
||
|
match r {
|
||
|
Ok(_) => Ok(handle),
|
||
|
Err(e) => {
|
||
|
- if unsafe { libc::setrlimit64(libc::RLIMIT_RTTIME, &limits) } < 0 {
|
||
|
+ if unsafe { libc::setrlimit(libc::RLIMIT_RTTIME, &limits) } < 0 {
|
||
|
return Err(AudioThreadPriorityError::new_with_inner(
|
||
|
- "setrlimit64",
|
||
|
+ "setrlimit",
|
||
|
Box::new(OSError::last_os_error()),
|
||
|
));
|
||
|
}
|