void-packages/srcpkgs/firefox/patches/initialize_sched_param.patch
Johannes f75fc1abdc firefox: update to 69.0.
[ci skip]
2019-09-05 20:03:06 +02:00

22 lines
1.1 KiB
Diff

source: https://github.com/padenot/audio_thread_priority/commit/a1443a02667c649cb72873a45b98fffbd2eac5a8
commit a1443a02667c649cb72873a45b98fffbd2eac5a8
Author: Paul Adenot <paul@paul.cx>
Date: Mon Aug 19 15:00:39 2019 +0200
initialize sched_param using std::mem::zeroed to fix compilation against other libc than glibc
diff --git a/src/rt_linux.rs b/src/rt_linux.rs
index d8c0114..fbb4fde 100644
--- third_party/rust/audio_thread_priority/src/rt_linux.rs.orig 2019-09-03 22:57:00.197152845 +0200
+++ third_party/rust/audio_thread_priority/src/rt_linux.rs 2019-09-03 23:05:42.219159018 +0200
@@ -93,8 +93,8 @@ pub fn promote_current_thread_to_real_time_internal(audio_buffer_frames: u32,
{
let thread_id = unsafe { libc::syscall(libc::SYS_gettid) };
let pthread_id = unsafe { libc::pthread_self() };
+ let mut param = unsafe { std::mem::zeroed::<libc::sched_param>() };
let mut policy = 0;
- let mut param = libc::sched_param { sched_priority: 0 };
if unsafe { libc::pthread_getschedparam(pthread_id, &mut policy, &mut param) } < 0 {
error!("pthread_getschedparam error {}", pthread_id);