From 844b4dcb7188b23ea88d4a46eea802af5db15642 Mon Sep 17 00:00:00 2001 From: Sertonix Date: Sat, 2 Aug 2025 00:32:37 +0200 Subject: [PATCH] widevine.patch widevine is linked against glibc and needs gcompat to work. Load the libraries before the sandbox is started. --- dom/media/gmp/GMPChild.cpp | 4 ++++ dom/media/gmp/GMPParent.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp index bbe722074b37c..88e9fd8503262 100644 --- a/dom/media/gmp/GMPChild.cpp +++ b/dom/media/gmp/GMPChild.cpp @@ -211,6 +211,10 @@ mozilla::ipc::IPCResult GMPChild::RecvPreloadLibs(const nsCString& aLibs) { "libdl.so.2", "libpthread.so.0", "librt.so.1", + "libgcompat.so.0", + "ld-linux-x86-64.so.2", + "ld-linux-aarch64.so.1", + "ld-linux.so.2", }; nsTArray libs; diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp index fdf156562dcee..8e071e1b962ec 100644 --- a/dom/media/gmp/GMPParent.cpp +++ b/dom/media/gmp/GMPParent.cpp @@ -1204,6 +1204,16 @@ RefPtr GMPParent::ParseChromiumManifest( // psapi.dll added for GetMappedFileNameW, which could possibly be avoided // in future versions, see bug 1383611 for details. mLibs = "dxva2.dll, ole32.dll, psapi.dll, shell32.dll, winmm.dll"_ns; +#elif XP_LINUX + mLibs = "libgcompat.so.0"_ns +#if defined(__x86_64__) + ", ld-linux-x86-64.so.2"_ns +#elif defined(__aarch64__) + ", ld-linux-aarch64.so.1"_ns +#elif defined(__i386__) + ", ld-linux.so.2"_ns +#endif + ; #endif break; #ifdef MOZ_WMF_CDM -- 2.56.0