1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 04:35:39 +03:00

testing/firefox-developer-edition: workaround for audio_thread_priority lfs64

This commit is contained in:
psykose 2023-07-08 01:48:59 +00:00
parent e53eaa9a52
commit 772103d1b9
2 changed files with 65 additions and 0 deletions

View file

@ -57,6 +57,7 @@ makedepends="
zip
"
source="https://ftp.mozilla.org/pub/firefox/releases/$_pkgver/source/firefox-$_pkgver.source.tar.xz
audio-lfs64.patch
disable-moz-stackwalk.patch
fix-fortify-system-wrappers.patch
fix-rust-target.patch
@ -99,6 +100,8 @@ prepare() {
cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/
_clear_vendor_checksums audio_thread_priority
cat > base-mozconfig <<-EOF
# disable unwanted things
ac_add_options --disable-bootstrap
@ -250,6 +253,7 @@ package() {
sha512sums="
108ff803704442cb0e7d1dd2044b17d96f5bc2ccca692d8603084afcf2805b1f4be33a2711136a80538c5b04cb1d719bd46528482e1591bb2eeda0d792727d57 firefox-116.0b2.source.tar.xz
3e0501ae7a650346c667dfdc0ae0ca286084f22e89ab2ac671cc0d7315673dc5b6dcb9f9882f6f39d26e9a31e57f7a0fd53d6b805e520224e22b8976850e2eb8 audio-lfs64.patch
454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch
2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch
cd68b89e29e5f6379fbd5679db27b9a5ef70ea65e51c0d0a8137e1f1fd210e35a8cfb047798e9549bc7275606d7ec5c8d8af1335d29da4699db7acd8bc7ff556 fix-rust-target.patch

View file

@ -0,0 +1,61 @@
--- 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()),
));
}