gtk+3: fix dependencies for new gnome/accessibility/at-spi2-core
[oi-userland.git] / components / web / firefox / patches / firefox-02-environ-revised.patch
blob8a9b48fe41799ba10d9c06e9cb223eb1df56081e
1 Subprocesses launched by firefox via modules/subprocess have an empty
2 environment due to incorrect assumptions about environ variable in the libc.
4 On Solaris, environ variable is not part of libc.so (weak binding
5 only) and hence loading it from libc yields only a null pointer. This
6 workaround gets environ variable directly from the firefox process.
8 Patch not suitable for upstream; the idea might be.
11 2023-12-19 Rocketman: Revised upstream patch to fix variable scoping
13 --- firefox-115.5.0/toolkit/modules/subprocess/subprocess_shared_unix.js.orig 2023-12-17 18:18:29.773082257 +0000
14 +++ firefox-115.5.0/toolkit/modules/subprocess/subprocess_shared_unix.js 2023-12-19 12:52:30.798318503 +0000
15 @@ -43,9 +43,11 @@
19 -var libc = new Library("libc", LIBC_CHOICES, {
20 +var libenv = new Library("libenv", ["a.out"], {
21 environ: [ctypes.char.ptr.ptr],
22 +})
24 +var libc = new Library("libc", LIBC_CHOICES, {
25 // Darwin-only.
26 _NSGetEnviron: [ctypes.default_abi, ctypes.char.ptr.ptr.ptr],
28 @@ -118,6 +120,8 @@
30 });
32 +libc.environ = libenv.environ;
34 unix.Fd = function (fd) {
35 return ctypes.CDataFinalizer(ctypes.int(fd), libc.close);