aboutsummaryrefslogtreecommitdiffstats
path: root/testing/firefox/rust_audio-thread-priority.patch
diff options
context:
space:
mode:
authorMilan P. Stanić <mps@arvanta.net>2019-12-05 06:37:40 +0000
committerRasmus Thomsen <oss@cogitri.dev>2019-12-19 12:42:48 +0100
commit68bd5137e6db9f9fdc9ff9920ed788f0baf1bd11 (patch)
tree85185792f9da8f03606ff7e2f4a009589c0caaa6 /testing/firefox/rust_audio-thread-priority.patch
parent3f27f64bfea410a914c5a8f90bcde44fdad51f0a (diff)
downloadaports-68bd5137e6db9f9fdc9ff9920ed788f0baf1bd11.tar.bz2
aports-68bd5137e6db9f9fdc9ff9920ed788f0baf1bd11.tar.xz
testing/firefox: upgrade to 71.0
reenable add rust_audio-thread-priority.patch from Void linux fix-third_party.patch use python2 not python2-dev in makedepends
Diffstat (limited to 'testing/firefox/rust_audio-thread-priority.patch')
-rw-r--r--testing/firefox/rust_audio-thread-priority.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/firefox/rust_audio-thread-priority.patch b/testing/firefox/rust_audio-thread-priority.patch
new file mode 100644
index 0000000000..e3c64ddbbe
--- /dev/null
+++ b/testing/firefox/rust_audio-thread-priority.patch
@@ -0,0 +1,39 @@
+backport of https://github.com/padenot/audio_thread_priority/commit/b5b86285d3c0cae2cb731730460f386ffa30cb03.patch
+avoids problems with serialization of RtPriorityThreadInfo in media/audioipc on musl
+
+--- a/third_party/rust/audio_thread_priority/src/rt_linux.rs 2019-12-02 13:24:01.000000000 +0100
++++ b/third_party/rust/audio_thread_priority/src/rt_linux.rs 2019-12-02 13:24:01.000000000 +0100
+@@ -31,9 +31,7 @@
+ /// process.
+ pthread_id: libc::pthread_t,
+ /// ...
+- policy: libc::c_int,
+- /// ...
+- param: libc::sched_param,
++ policy: libc::c_int
+ }
+
+ impl RtPriorityThreadInfoInternal {
+@@ -141,9 +139,11 @@
+ -> Result<(), ()> {
+ assert!(unsafe { libc::pthread_self() } == rt_priority_handle.thread_info.pthread_id);
+
++ let param = unsafe { std::mem::zeroed::<libc::sched_param>() };
++
+ if unsafe { libc::pthread_setschedparam(rt_priority_handle.thread_info.pthread_id,
+ rt_priority_handle.thread_info.policy,
+- &rt_priority_handle.thread_info.param) } < 0 {
++ &param) } < 0 {
+ error!("could not demote thread {}", OSError::last_os_error().raw_os_error().unwrap());
+ return Err(());
+ }
+@@ -187,8 +187,7 @@
+ pid,
+ thread_id,
+ pthread_id,
+- policy,
+- param
++ policy
+ })
+ }
+