projects/aports·blob master · refs

51 lines · 1.7 KiB

1From 844b4dcb7188b23ea88d4a46eea802af5db15642 Mon Sep 17 00:00:00 2001
2From: Sertonix <[email protected]>
3Date: Sat, 2 Aug 2025 00:32:37 +0200
4Subject: [PATCH] widevine.patch
5
6widevine is linked against glibc and needs gcompat to work. Load the
7libraries before the sandbox is started.
8---
9 dom/media/gmp/GMPChild.cpp | 4 ++++
10 dom/media/gmp/GMPParent.cpp | 10 ++++++++++
11 2 files changed, 14 insertions(+)
12
13diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp
14index bbe722074b37c..88e9fd8503262 100644
15--- a/dom/media/gmp/GMPChild.cpp
16+++ b/dom/media/gmp/GMPChild.cpp
17@@ -211,6 +211,10 @@ mozilla::ipc::IPCResult GMPChild::RecvPreloadLibs(const nsCString& aLibs) {
18 "libdl.so.2",
19 "libpthread.so.0",
20 "librt.so.1",
21+ "libgcompat.so.0",
22+ "ld-linux-x86-64.so.2",
23+ "ld-linux-aarch64.so.1",
24+ "ld-linux.so.2",
25 };
26
27 nsTArray<nsCString> libs;
28diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp
29index fdf156562dcee..8e071e1b962ec 100644
30--- a/dom/media/gmp/GMPParent.cpp
31+++ b/dom/media/gmp/GMPParent.cpp
32@@ -1204,6 +1204,16 @@ RefPtr<GenericPromise> GMPParent::ParseChromiumManifest(
33 // psapi.dll added for GetMappedFileNameW, which could possibly be avoided
34 // in future versions, see bug 1383611 for details.
35 mLibs = "dxva2.dll, ole32.dll, psapi.dll, shell32.dll, winmm.dll"_ns;
36+#elif XP_LINUX
37+ mLibs = "libgcompat.so.0"_ns
38+#if defined(__x86_64__)
39+ ", ld-linux-x86-64.so.2"_ns
40+#elif defined(__aarch64__)
41+ ", ld-linux-aarch64.so.1"_ns
42+#elif defined(__i386__)
43+ ", ld-linux.so.2"_ns
44+#endif
45+ ;
46 #endif
47 break;
48 #ifdef MOZ_WMF_CDM
49--
502.56.0
51