| 1 | From 844b4dcb7188b23ea88d4a46eea802af5db15642 Mon Sep 17 00:00:00 2001
|
| 2 | From: Sertonix <[email protected]>
|
| 3 | Date: Sat, 2 Aug 2025 00:32:37 +0200
|
| 4 | Subject: [PATCH] widevine.patch
|
| 5 |
|
| 6 | widevine is linked against glibc and needs gcompat to work. Load the
|
| 7 | libraries 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 |
|
| 13 | diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp
|
| 14 | index bbe722074b37c..88e9fd8503262 100644
|
| 15 | |
| 16 | |
| 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;
|
| 28 | diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp
|
| 29 | index fdf156562dcee..8e071e1b962ec 100644
|
| 30 | |
| 31 | |
| 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 | --
|
| 50 | 2.56.0
|
| 51 |
|