aports/community/librewolf/widevine.patch
2025-08-21 15:43:00 +01:00

36 lines
1021 B
Diff

widevine is linked against glibc and needs gcompat to work. Load the
libraries before the sandbox is started.
--- a/dom/media/gmp/GMPChild.cpp
+++ b/dom/media/gmp/GMPChild.cpp
@@ -208,6 +208,10 @@
"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<nsCString> libs;
--- a/dom/media/gmp/GMPParent.cpp
+++ b/dom/media/gmp/GMPParent.cpp
@@ -1206,6 +1206,16 @@
// 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