From 50c122d4d1a3c3325a788c8b54586ad5aa2cfdff Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 30 Dec 2025 21:39:41 +1000
Subject: [PATCH] librewolf: bump version
---
...43.0.4.recipe => librewolf-146.0.1.recipe} | 2 +-
....4.patchset => librewolf-146.0.1.patchset} | 1017 ++++++++++++-----
...et => librewolf_launcher-146.0.1.patchset} | 0
3 files changed, 726 insertions(+), 293 deletions(-)
rename www-client/librewolf/{librewolf-143.0.4.recipe => librewolf-146.0.1.recipe} (98%)
rename www-client/librewolf/patches/{librewolf-143.0.4.patchset => librewolf-146.0.1.patchset} (91%)
rename www-client/librewolf/patches/{librewolf_launcher-143.0.4.patchset => librewolf_launcher-146.0.1.patchset} (100%)
diff --git a/www-client/librewolf/librewolf-143.0.4.recipe b/www-client/librewolf/librewolf-146.0.1.recipe
similarity index 98%
rename from www-client/librewolf/librewolf-143.0.4.recipe
rename to www-client/librewolf/librewolf-146.0.1.recipe
index cfb277499..cae45920b 100644
--- a/www-client/librewolf/librewolf-143.0.4.recipe
+++ b/www-client/librewolf/librewolf-146.0.1.recipe
@@ -12,7 +12,7 @@ COPYRIGHT="1995-2025 Mozilla Developers and Contributors"
LICENSE="MPL v2.0"
REVISION="1"
SOURCE_URI="https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/${portVersion}-1/librewolf-${portVersion}-1.source.tar.gz"
-CHECKSUM_SHA256="c40d149016c578d39f7a9f25f28cf31960c6009ca81782675145c5c976b63360"
+CHECKSUM_SHA256="f872b12327543e1e454f9a50be9a7675450aed3e04cc87e1a8c7fb4f235c2bf7"
SOURCE_DIR="librewolf-${portVersion}-1"
PATCHES="
librewolf-$portVersion.patchset
diff --git a/www-client/librewolf/patches/librewolf-143.0.4.patchset b/www-client/librewolf/patches/librewolf-146.0.1.patchset
similarity index 91%
rename from www-client/librewolf/patches/librewolf-143.0.4.patchset
rename to www-client/librewolf/patches/librewolf-146.0.1.patchset
index 3ad318794..4e6846cab 100644
--- a/www-client/librewolf/patches/librewolf-143.0.4.patchset
+++ b/www-client/librewolf/patches/librewolf-146.0.1.patchset
@@ -1,6 +1,6 @@
-From d137db8c5bcfbe856f526217b4cd6e4306d77c36 Mon Sep 17 00:00:00 2001
+From 1bae89b6b5650b467fd94ef84001c5ff03ee5924 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
-Date: Fri, 26 Sep 2025 09:31:18 +1000
+Date: Tue, 30 Dec 2025 13:44:15 +1000
Subject: Add Haiku build support
Based on patches sourced from https://github.com/kenz-gelsoft/gecko-dev/
@@ -14,7 +14,7 @@ Based on patches sourced from https://github.com/kenz-gelsoft/gecko-dev/
- Implement remote server
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
-index d4f0e75..8297455 100644
+index c5e3248..5cbbcbc 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -15,7 +15,9 @@
@@ -28,16 +28,16 @@ index d4f0e75..8297455 100644
#endif
#endif
-@@ -264,7 +266,7 @@ pref("browser.fixup.domainsuffixwhitelist.local", true);
- // search string, that may contain a valid host, to a search engine.
- pref("browser.fixup.dns_first_for_single_words", false);
+@@ -244,7 +246,7 @@ pref("browser.uitour.url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/t
+ // How long to show a Hearbeat survey (two hours, in seconds)
+ pref("browser.uitour.surveyDuration", 7200);
-#ifdef UNIX_BUT_NOT_MAC
+#ifdef UNIX_BUT_NOT_MAC_NOR_HAIKU
pref("general.autoScroll", false);
#else
pref("general.autoScroll", true);
-@@ -1060,7 +1062,7 @@ pref("browser.unexpectedScriptLoad.logLevel", "Warn");
+@@ -1112,7 +1114,7 @@ pref("browser.unexpectedScriptLoad.logLevel", "Warn");
pref("browser.tabs.min_inactive_duration_before_unload", 600000);
// Does middleclick paste of clipboard to new tab button
@@ -47,7 +47,7 @@ index d4f0e75..8297455 100644
#else
pref("browser.tabs.searchclipboardfor.middleclick", false);
diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc
-index 2e76540..e3bc0dd 100644
+index 8d97b6e..180001f 100644
--- a/browser/base/content/browser-sets.inc
+++ b/browser/base/content/browser-sets.inc
@@ -6,6 +6,12 @@
@@ -63,7 +63,7 @@ index 2e76540..e3bc0dd 100644
#endif
#endif
-@@ -201,7 +207,7 @@
+@@ -202,7 +208,7 @@
@@ -72,7 +72,7 @@ index 2e76540..e3bc0dd 100644
#else
-@@ -346,10 +352,14 @@
+@@ -347,10 +353,14 @@
#ifdef XP_GNOME
@@ -115,7 +115,7 @@ index af2fc4f..e61403a 100644
LIBRARY_DEFINES["MOZ_HAS_MOZGLUE"] = True
if not CONFIG["MOZ_GLUE_IN_PROGRAM"]:
diff --git a/build/gn_processor.py b/build/gn_processor.py
-index 20f2e0d..ad9cf26 100644
+index 4e42958..0fe7752 100644
--- a/build/gn_processor.py
+++ b/build/gn_processor.py
@@ -185,6 +185,7 @@ def filter_gn_config(path, gn_result, sandbox_vars, input_vars, gn_target):
@@ -176,7 +176,7 @@ index 8acb326..a50a782 100644
},
}],
diff --git a/build/moz.configure/bindgen.configure b/build/moz.configure/bindgen.configure
-index af5a0cd..1d6be80 100644
+index 8cb11d4..6519a57 100644
--- a/build/moz.configure/bindgen.configure
+++ b/build/moz.configure/bindgen.configure
@@ -203,7 +203,7 @@ def bindgen_libclang_path(libclang_path, clang, library_name_info, host):
@@ -189,20 +189,22 @@ index af5a0cd..1d6be80 100644
if host.os == "OpenBSD":
diff --git a/build/moz.configure/flags.configure b/build/moz.configure/flags.configure
-index f0f4d7a..297718d 100644
+index 302505d..f3c0267 100644
--- a/build/moz.configure/flags.configure
+++ b/build/moz.configure/flags.configure
-@@ -520,7 +520,7 @@ set_config("EXPAND_LIBS_LIST_STYLE", expand_libs_list_style)
+@@ -520,8 +520,8 @@ set_config("EXPAND_LIBS_LIST_STYLE", expand_libs_list_style)
# ---------------------------------
@depends(building_with_gnu_compatible_cc, target)
def moz_program_ldflags(building_with_gnu_compatible_cc, target):
- if building_with_gnu_compatible_cc and target.kernel not in ("Darwin", "WASI"):
+- return ["-pie"]
+ if building_with_gnu_compatible_cc and target.kernel not in ("Darwin", "WASI", "Haiku"):
- return ["-pie"]
++ return ["-fPIC"]
+ set_config("MOZ_PROGRAM_LDFLAGS", moz_program_ldflags)
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
-index 6baa691..d583a4f 100644
+index 892faaf..e4e50bf 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -519,6 +519,8 @@ def split_triplet(triplet, allow_wasi=False):
@@ -231,10 +233,10 @@ index 6baa691..d583a4f 100644
def target_is_solaris(target):
if target.kernel == "SunOS":
diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
-index f79ee7b..9090574 100644
+index 3d8d2ea..c4ad7fb 100644
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
-@@ -2965,7 +2965,7 @@ def security_hardening_cflags(
+@@ -2905,7 +2905,7 @@ def security_hardening_cflags(
if (
c_compiler.type == "clang"
and c_compiler.version >= "11.0.1"
@@ -258,6 +260,18 @@ index ba024e8..1479348 100644
ifdef MOZ_USING_SCCACHE
export RUSTC_WRAPPER=$(CCACHE)
endif
+diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
+index b14afa4..ce578d2 100644
+--- a/config/system-headers.mozbuild
++++ b/config/system-headers.mozbuild
+@@ -865,7 +865,6 @@ system_headers = [
+ "sys/shm.h",
+ "sys/siginfo.h",
+ "sys/signal.h",
+- "sys/single_threaded.h",
+ "sys/socket.h",
+ "sys/sockio.h",
+ "sys/sparc/frame.h",
diff --git a/dom/events/ShortcutKeyDefinitions.cpp b/dom/events/ShortcutKeyDefinitions.cpp
index 3f34f45..97b7c98 100644
--- a/dom/events/ShortcutKeyDefinitions.cpp
@@ -583,7 +597,7 @@ index a0ec09e..59d98a3 100644
void setDataFromBytes(SkSpan allocation) {
T* data = TCast(allocation.data());
diff --git a/image/SurfaceCache.cpp b/image/SurfaceCache.cpp
-index f97b32d..7857331 100644
+index c01b18e..4e47963 100644
--- a/image/SurfaceCache.cpp
+++ b/image/SurfaceCache.cpp
@@ -1625,7 +1625,7 @@ void SurfaceCache::Initialize() {
@@ -596,10 +610,10 @@ index f97b32d..7857331 100644
#endif
memorySize = 256 * 1024 * 1024; // Fall back to 256MB.
diff --git a/ipc/chromium/moz.build b/ipc/chromium/moz.build
-index 95b4384..fe10547 100644
+index 8454c22..1daaa7f 100644
--- a/ipc/chromium/moz.build
+++ b/ipc/chromium/moz.build
-@@ -113,7 +113,7 @@ if CONFIG["TARGET_OS"] == "iOS":
+@@ -112,7 +112,7 @@ if CONFIG["TARGET_OS"] == "iOS":
"src/base/process_util_ios.cpp",
]
@@ -609,10 +623,10 @@ index 95b4384..fe10547 100644
"src/base/process_util_linux.cc",
"src/base/time_posix.cc",
diff --git a/ipc/chromium/src/base/message_loop.cc b/ipc/chromium/src/base/message_loop.cc
-index c07963f..5518456 100644
+index 8aa6f15..287213e 100644
--- a/ipc/chromium/src/base/message_loop.cc
+++ b/ipc/chromium/src/base/message_loop.cc
-@@ -27,7 +27,7 @@
+@@ -29,7 +29,7 @@
# include "base/message_pump_libevent.h"
#endif
#if defined(XP_LINUX) || defined(__DragonFly__) || defined(XP_FREEBSD) || \
@@ -621,7 +635,7 @@ index c07963f..5518456 100644
# if defined(MOZ_WIDGET_GTK)
# include "base/message_pump_glib.h"
# endif
-@@ -281,7 +281,7 @@ MessageLoop::MessageLoop(Type type, nsISerialEventTarget* aEventTarget)
+@@ -275,7 +275,7 @@ MessageLoop::MessageLoop(Type type, nsISerialEventTarget* aEventTarget)
# if defined(XP_DARWIN)
pump_ = base::MessagePumpMac::Create();
# elif defined(XP_LINUX) || defined(__DragonFly__) || defined(XP_FREEBSD) || \
@@ -666,10 +680,10 @@ index d28abbc..af56adf 100644
}
diff --git a/ipc/chromium/src/base/process_util_posix.cc b/ipc/chromium/src/base/process_util_posix.cc
-index 23b8807..aec9dc4 100644
+index 7b72b5d..247b080 100644
--- a/ipc/chromium/src/base/process_util_posix.cc
+++ b/ipc/chromium/src/base/process_util_posix.cc
-@@ -129,7 +129,7 @@ void CloseSuperfluousFds(void* aCtx, bool (*aShouldPreserve)(void*, int)) {
+@@ -128,7 +128,7 @@ void CloseSuperfluousFds(void* aCtx, bool (*aShouldPreserve)(void*, int)) {
#if defined(ANDROID)
static const rlim_t kSystemDefaultMaxFds = 1024;
static const char kFDDir[] = "/proc/self/fd";
@@ -679,10 +693,10 @@ index 23b8807..aec9dc4 100644
static const char kFDDir[] = "/proc/self/fd";
#elif defined(XP_DARWIN)
diff --git a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-index ff65fad..9bbba93 100644
+index 2fc3ed4..184448d 100644
--- a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
+++ b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-@@ -292,6 +292,18 @@ bool ChannelPosix::ProcessIncomingMessages() {
+@@ -291,6 +291,18 @@ bool ChannelPosix::ProcessIncomingMessages() {
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
const unsigned payload_len = cmsg->cmsg_len - CMSG_LEN(0);
DCHECK(payload_len % sizeof(int) == 0);
@@ -701,7 +715,7 @@ index ff65fad..9bbba93 100644
wire_fds = reinterpret_cast(CMSG_DATA(cmsg));
num_wire_fds = payload_len / 4;
-@@ -303,7 +315,9 @@ bool ChannelPosix::ProcessIncomingMessages() {
+@@ -302,7 +314,9 @@ bool ChannelPosix::ProcessIncomingMessages() {
IGNORE_EINTR(close(wire_fds[i]));
return false;
}
@@ -712,7 +726,7 @@ index ff65fad..9bbba93 100644
}
}
diff --git a/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc b/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc
-index 0cfd739..439aed9 100644
+index 5bf6a89..f9cbe6a 100644
--- a/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc
+++ b/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc
@@ -37,7 +37,7 @@
@@ -725,10 +739,10 @@ index 0cfd739..439aed9 100644
# define HAVE_PIPE2 1
#endif
diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp
-index 83241df..05e0587 100644
+index 2c31922..dc3a65d 100644
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
-@@ -1120,7 +1120,7 @@ Result BaseProcessLauncher::DoSetup() {
+@@ -1116,7 +1116,7 @@ Result BaseProcessLauncher::DoSetup() {
#if defined(MOZ_WIDGET_COCOA) || defined(XP_WIN)
geckoargs::sCrashReporter.Put(CrashReporter::GetChildNotificationPipe(),
mChildArgs);
@@ -738,10 +752,10 @@ index 83241df..05e0587 100644
if (!childCrashFd) {
return Err(LaunchError("DuplicateFileHandle failed"));
diff --git a/js/src/moz.build b/js/src/moz.build
-index 9b50953..cfc4c9f 100644
+index f19c88e..03b07fd 100644
--- a/js/src/moz.build
+++ b/js/src/moz.build
-@@ -509,6 +509,11 @@ elif CONFIG["OS_ARCH"] == "WASI":
+@@ -516,6 +516,11 @@ elif CONFIG["OS_ARCH"] == "WASI":
"threading/noop/NoopThread.cpp",
]
else:
@@ -782,11 +796,61 @@ index e77289c..4946275 100644
#elif defined(__wasi__)
// Since we rearrange the layout for wasi via --stack-first flag for the linker
+diff --git a/js/src/vm/DateTime.cpp b/js/src/vm/DateTime.cpp
+index 5f329ff..5a049f2 100644
+--- a/js/src/vm/DateTime.cpp
++++ b/js/src/vm/DateTime.cpp
+@@ -10,6 +10,15 @@
+ # include "mozilla/intl/ICU4CGlue.h"
+ # include "mozilla/intl/TimeZone.h"
+ #endif
++
++#if JS_HAS_INTL_API && defined(__HAIKU__)
++# pragma GCC visibility push(default)
++# include
++# include
++# include
++# pragma GCC visibility pop
++#endif
++
+ #include "mozilla/ScopeExit.h"
+ #include "mozilla/Span.h"
+ #include "mozilla/TextUtils.h"
+@@ -812,6 +821,21 @@ static bool ReadTimeZoneLink(std::string_view tz,
+ #endif /* JS_HAS_INTL_API */
+
+ void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
++#if defined(__HAIKU__)
++ BTimeZone timeZone;
++ if (BLocaleRoster::Default()->GetDefaultTimeZone(&timeZone) == B_OK) {
++ BString timeZoneID = timeZone.ID();
++ if (timeZoneID.Length() > 0) {
++ mozilla::Span tzid(timeZoneID.String(),
++ timeZoneID.Length());
++ auto result = mozilla::intl::TimeZone::SetDefaultTimeZone(tzid);
++ if (result.isOk() && result.unwrap()) {
++ return;
++ }
++ }
++ }
++ (void)mozilla::intl::TimeZone::SetDefaultTimeZoneFromHostTimeZone();
++#else
+ #if JS_HAS_INTL_API
+ if (const char* tzenv = std::getenv("TZ")) {
+ std::string_view tz(tzenv);
+@@ -874,5 +898,6 @@ void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
+ // Intentionally ignore any errors, because we don't have a good way to report
+ // errors from this function.
+ (void)mozilla::intl::TimeZone::SetDefaultTimeZoneFromHostTimeZone();
+-#endif
++#endif /* JS_HAS_INTL_API */
++#endif /* __HAIKU__ */
+ }
diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp
-index 06954b3..f9dd019 100644
+index 291eaa1..373b8ec 100644
--- a/js/src/wasm/WasmSignalHandlers.cpp
+++ b/js/src/wasm/WasmSignalHandlers.cpp
-@@ -232,6 +232,17 @@ using namespace js::wasm;
+@@ -238,6 +238,17 @@ using namespace js::wasm;
# define R01_sig(p) ((p)->uc_mcontext.mc_gpr[1])
# define R32_sig(p) ((p)->uc_mcontext.mc_srr0)
# endif
@@ -804,6 +868,28 @@ index 06954b3..f9dd019 100644
# elif defined(XP_DARWIN)
# define EIP_sig(p) ((p)->thread.uts.ts32.__eip)
# define EBP_sig(p) ((p)->thread.uts.ts32.__ebp)
+diff --git a/media/ffvpx/config_unix64.h b/media/ffvpx/config_unix64.h
+index 7d63f47..f72e3bd 100644
+--- a/media/ffvpx/config_unix64.h
++++ b/media/ffvpx/config_unix64.h
+@@ -291,7 +291,7 @@
+ #define HAVE_COMMANDLINETOARGVW 0
+ #define HAVE_FCNTL 1
+ #define HAVE_GETADDRINFO 1
+-#define HAVE_GETAUXVAL 1
++#define HAVE_GETAUXVAL 0
+ #define HAVE_GETENV 1
+ #define HAVE_GETHRTIME 0
+ #define HAVE_GETOPT 1
+@@ -319,7 +319,7 @@
+ #define HAVE_NANOSLEEP 1
+ #define HAVE_PEEKNAMEDPIPE 0
+ #define HAVE_PTHREAD_CANCEL 1
+-#define HAVE_SCHED_GETAFFINITY 1
++#define HAVE_SCHED_GETAFFINITY 0
+ #define HAVE_SECITEMIMPORT 0
+ #define HAVE_SETCONSOLETEXTATTRIBUTE 0
+ #define HAVE_SETCONSOLECTRLHANDLER 0
diff --git a/media/libcubeb/src/cubeb.c b/media/libcubeb/src/cubeb.c
index 0511ad9..1e0b48e 100644
--- a/media/libcubeb/src/cubeb.c
@@ -1835,10 +1921,10 @@ index 7ab524b..4c5fef4 100644
# We allow warnings for third-party code that can be updated from upstream.
diff --git a/mfbt/Assertions.h b/mfbt/Assertions.h
-index c3ea652..0ef9564 100644
+index 15c70f8..661cf60 100644
--- a/mfbt/Assertions.h
+++ b/mfbt/Assertions.h
-@@ -231,7 +231,7 @@ MOZ_NoReturn(int aLine) {
+@@ -220,7 +220,7 @@ MOZ_ReportAssertionFailure(const char* aStr, const char* aFilename,
MOZ_NoReturn(line); \
} while (false)
@@ -1848,10 +1934,10 @@ index c3ea652..0ef9564 100644
# define MOZ_REALLY_CRASH(line) __builtin_trap()
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
-index a6c4943..f7030de 100644
+index 2380e2a..0d9a490 100644
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
-@@ -11400,6 +11400,8 @@
+@@ -11586,6 +11586,8 @@
value: true
#elif defined(XP_SOLARIS)
value: true
@@ -1860,7 +1946,7 @@ index a6c4943..f7030de 100644
#else
value: false
#endif
-@@ -11444,6 +11446,8 @@
+@@ -11638,6 +11640,8 @@
value: true
#elif defined(XP_SOLARIS)
value: true
@@ -1869,7 +1955,7 @@ index a6c4943..f7030de 100644
#else
value: false
#endif
-@@ -11477,6 +11481,8 @@
+@@ -11676,6 +11680,8 @@
value: true
#elif defined(XP_SOLARIS)
value: true
@@ -1878,7 +1964,7 @@ index a6c4943..f7030de 100644
#else
value: false
#endif
-@@ -11496,6 +11502,8 @@
+@@ -11704,6 +11710,8 @@
value: true
#elif defined(XP_SOLARIS)
value: true
@@ -1887,47 +1973,47 @@ index a6c4943..f7030de 100644
#else
value: false
#endif
-@@ -11515,6 +11523,8 @@
- value: true
- #elif defined(XP_SOLARIS)
- value: true
-+#elif defined(XP_HAIKU)
-+ value: true
- #else
- value: false
- #endif
-@@ -11534,6 +11544,8 @@
- value: true
- #elif defined(XP_SOLARIS)
- value: true
-+#elif defined(XP_HAIKU)
-+ value: true
- #else
- value: false
- #endif
-@@ -11562,6 +11574,8 @@
- value: true
- #elif defined(XP_SOLARIS)
- value: true
-+#elif defined(XP_HAIKU)
-+ value: true
- #else
- value: false
- #endif
-@@ -12525,6 +12539,8 @@
+@@ -12675,6 +12683,8 @@
type: bool
#if defined(MOZ_WIDGET_ANDROID)
value: true
+#elif defined(XP_HAIKU)
++ value: true
+ #else
+ value: false
+ #endif
+@@ -12773,6 +12783,8 @@
+ type: bool
+ #if !defined(MOZ_WIDGET_ANDROID)
+ value: true
++#elif defined(XP_HAIKU)
++ value: true
+ #else
+ value: false
+ #endif
+@@ -12782,6 +12794,8 @@
+ type: bool
+ #if defined(MOZ_WIDGET_ANDROID)
+ value: true
++#elif defined(XP_HAIKU)
++ value: true
+ #else
+ value: false
+ #endif
+@@ -14256,6 +14270,8 @@
+ type: RelaxedAtomicBool
+ #if !defined(XP_MACOSX)
+ value: true
++#elif defined(XP_HAIKU)
+ value: true
#else
value: false
#endif
diff --git a/moz.configure b/moz.configure
-index 323b48f..5455491 100755
+index f668a32..a0ff1ff 100755
--- a/moz.configure
+++ b/moz.configure
-@@ -866,6 +866,8 @@ def strip_flags(flags, profiling, target):
+@@ -884,6 +884,8 @@ def strip_flags(flags, profiling, target):
# On Darwin, it tries to strip things it can't, so we need to limit its scope.
elif target.kernel == "Darwin":
return ["-x", "-S"]
@@ -2003,10 +2089,10 @@ index d1659d8..b43e029 100644
+
#endif // MutexPlatformData_posix_h
diff --git a/mozglue/misc/PlatformMutex.h b/mozglue/misc/PlatformMutex.h
-index ac5459c..d014d11 100644
+index 0cb03ad..fb4b014 100644
--- a/mozglue/misc/PlatformMutex.h
+++ b/mozglue/misc/PlatformMutex.h
-@@ -49,10 +49,17 @@ class MutexImpl {
+@@ -48,10 +48,17 @@ class MutexImpl {
PlatformData* platformData();
#if !defined(XP_WIN) && !defined(__wasi__)
@@ -2040,7 +2126,7 @@ index c24cfac..bc22455 100644
#include
#include
diff --git a/netwerk/base/nsStandardURL.cpp b/netwerk/base/nsStandardURL.cpp
-index b2778ad..553fdfc 100644
+index e570e5f..9bb4b5c 100644
--- a/netwerk/base/nsStandardURL.cpp
+++ b/netwerk/base/nsStandardURL.cpp
@@ -320,7 +320,7 @@ struct DumpLeakedURLs {
@@ -2202,11 +2288,80 @@ index cde6ecc..0407d01 100644
if (error == ERESTART) {
error = EINTR;
}
+diff --git a/nsprpub/pr/src/misc/Makefile.in b/nsprpub/pr/src/misc/Makefile.in
+index 3d87da2..64b9b29 100644
+--- a/nsprpub/pr/src/misc/Makefile.in
++++ b/nsprpub/pr/src/misc/Makefile.in
+@@ -45,6 +45,12 @@ CSRCS += \
+ $(NULL)
+ endif
+
++ifeq ($OS_ARCH),Haiku)
++CPPSRCS += \
++ prhaiku.cpp \
++ $(NULL)
++endif
++
+ TARGETS = $(OBJS)
+
+ INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private
+diff --git a/nsprpub/pr/src/misc/prhaiku.cpp b/nsprpub/pr/src/misc/prhaiku.cpp
+new file mode 100644
+index 0000000..7532003
+--- /dev/null
++++ b/nsprpub/pr/src/misc/prhaiku.cpp
+@@ -0,0 +1,46 @@
++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
++/* This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++/*
++ * Haiku-specific time zone support using native BTimeZone API
++ */
++
++#if defined(__HAIKU__)
++
++#pragma GCC visibility push(default)
++#include
++#include
++#include
++#pragma GCC visibility pop
++
++extern "C" {
++
++int32_t _PR_Haiku_GetTimeZoneOffset(void) {
++ BTimeZone timeZone;
++ if (BLocaleRoster::Default()->GetDefaultTimeZone(&timeZone) != B_OK) {
++ return 0;
++ }
++ return timeZone.OffsetFromGMT();
++}
++
++int32_t _PR_Haiku_GetDSTOffset(int64_t utcTimeInSeconds) {
++ BTimeZone timeZone;
++ if (BLocaleRoster::Default()->GetDefaultTimeZone(&timeZone) != B_OK) {
++ return 0;
++ }
++
++ bigtime_t utcTime = utcTimeInSeconds * 1000000LL;
++ if (!timeZone.IsDaylightSavingTime(utcTime)) {
++ return 0;
++ }
++
++ int32_t fullOffset = timeZone.OffsetFromGMT(utcTime);
++ int32_t standardOffset = timeZone.OffsetFromGMT();
++ return fullOffset - standardOffset;
++}
++
++} // extern "C"
++
++#endif // __HAIKU__
diff --git a/nsprpub/pr/src/misc/prsystem.c b/nsprpub/pr/src/misc/prsystem.c
-index f9fa0f6..7bb78a9 100644
+index 863af6b..4994bd4 100644
--- a/nsprpub/pr/src/misc/prsystem.c
+++ b/nsprpub/pr/src/misc/prsystem.c
-@@ -244,7 +244,7 @@ PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors(void) {
+@@ -234,7 +234,7 @@ PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors(void) {
PR_IMPLEMENT(PRUint64) PR_GetPhysicalMemorySize(void) {
PRUint64 bytes = 0;
@@ -2215,11 +2370,76 @@ index f9fa0f6..7bb78a9 100644
long pageSize = sysconf(_SC_PAGESIZE);
long pageCount = sysconf(_SC_PHYS_PAGES);
+diff --git a/nsprpub/pr/src/misc/prtime.c b/nsprpub/pr/src/misc/prtime.c
+index 64461c6..698af2a 100644
+--- a/nsprpub/pr/src/misc/prtime.c
++++ b/nsprpub/pr/src/misc/prtime.c
+@@ -21,6 +21,11 @@
+ #include /* for EINVAL */
+ #include
+
++#if defined(__HAIKU__)
++extern int32_t _PR_Haiku_GetTimeZoneOffset(void);
++extern int32_t _PR_Haiku_GetDSTOffset(int64_t utcTimeInSeconds);
++#endif
++
+ /*
+ * The COUNT_LEAPS macro counts the number of leap years passed by
+ * till the start of the given year Y. At the start of the year 4
+@@ -556,7 +561,47 @@ void _PR_CleanupTime(void) {
+ #endif
+ }
+
+-#if defined(XP_UNIX) || defined(XP_PC)
++#if defined(__HAIKU__)
++
++PR_IMPLEMENT(PRTimeParameters)
++PR_LocalTimeParameters(const PRExplodedTime* gmt) {
++ PRTimeParameters retVal;
++ PRTime secs64;
++ PRInt64 usecPerSec;
++ PRInt64 usecPerSec_1;
++ PRInt64 maxInt32;
++ PRInt64 minInt32;
++ int64_t utcSeconds;
++
++ retVal.tp_gmt_offset = _PR_Haiku_GetTimeZoneOffset();
++
++ secs64 = PR_ImplodeTime(gmt);
++ LL_I2L(usecPerSec, PR_USEC_PER_SEC);
++ LL_I2L(usecPerSec_1, PR_USEC_PER_SEC - 1);
++
++ if (LL_GE_ZERO(secs64)) {
++ LL_DIV(secs64, secs64, usecPerSec);
++ } else {
++ LL_NEG(secs64, secs64);
++ LL_ADD(secs64, secs64, usecPerSec_1);
++ LL_DIV(secs64, secs64, usecPerSec);
++ LL_NEG(secs64, secs64);
++ }
++
++ LL_I2L(maxInt32, PR_INT32_MAX);
++ LL_I2L(minInt32, PR_INT32_MIN);
++ if (LL_CMP(secs64, >, maxInt32) || LL_CMP(secs64, <, minInt32)) {
++ retVal.tp_dst_offset = 0;
++ return retVal;
++ }
++
++ LL_L2I(utcSeconds, secs64);
++ retVal.tp_dst_offset = _PR_Haiku_GetDSTOffset(utcSeconds);
++
++ return retVal;
++}
++
++#elif defined(XP_UNIX) || defined(XP_PC)
+
+ PR_IMPLEMENT(PRTimeParameters)
+ PR_LocalTimeParameters(const PRExplodedTime* gmt) {
diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py
-index cb469db..4c047f5 100644
+index 84896ea..12f58fc 100644
--- a/python/mach/mach/site.py
+++ b/python/mach/mach/site.py
-@@ -1509,6 +1509,14 @@ def _create_venv_with_pthfile(
+@@ -1519,6 +1519,14 @@ def _create_venv_with_pthfile(
_ensure_python_exe(Path(target_venv.python_path).parent)
@@ -2248,7 +2468,7 @@ index f40c9ec..09eec7d 100644
elif version:
print("Your version of Rust (%s) is too old." % version)
diff --git a/python/mozboot/mozboot/bootstrap.py b/python/mozboot/mozboot/bootstrap.py
-index 083aa60..e4d216d 100644
+index 7e8d5e6..78f057b 100644
--- a/python/mozboot/mozboot/bootstrap.py
+++ b/python/mozboot/mozboot/bootstrap.py
@@ -34,6 +34,7 @@ from mozboot.centosfedora import CentOSFedoraBootstrapper
@@ -2259,7 +2479,7 @@ index 083aa60..e4d216d 100644
from mozboot.mozconfig import MozconfigBuilder
from mozboot.mozillabuild import MozillaBuildBootstrapper
from mozboot.openbsd import OpenBSDBootstrapper
-@@ -311,6 +312,10 @@ class Bootstrapper:
+@@ -309,6 +310,10 @@ class Bootstrapper:
args["version"] = platform.release()
args["flavor"] = platform.system()
@@ -2364,10 +2584,10 @@ index 25f43bb..967aee7 100644
"Linux": "__linux__",
"NetBSD": "__NetBSD__",
diff --git a/security/certverifier/ExtendedValidation.cpp b/security/certverifier/ExtendedValidation.cpp
-index ca05c3b..c9bf842 100644
+index ffd7d37..2ce0dfc 100644
--- a/security/certverifier/ExtendedValidation.cpp
+++ b/security/certverifier/ExtendedValidation.cpp
-@@ -1306,7 +1306,9 @@ nsresult LoadExtendedValidationInfo() {
+@@ -1350,7 +1350,9 @@ nsresult LoadExtendedValidationInfo() {
// The entries for the debug EV roots are at indices 0 through
// NUM_TEST_EV_ROOTS - 1. Since they're not built-in, they probably
// haven't been loaded yet.
@@ -2378,10 +2598,10 @@ index ca05c3b..c9bf842 100644
unsigned char certFingerprint[SHA256_LENGTH];
srv = PK11_HashBuf(SEC_OID_SHA256, certFingerprint, cert->derCert.data,
diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml
-index 1e6a82e..96bb4a7 100644
+index b6dd6e8..9823568 100644
--- a/supply-chain/audits.toml
+++ b/supply-chain/audits.toml
-@@ -2761,6 +2761,12 @@ criteria = "safe-to-deploy"
+@@ -2875,6 +2875,12 @@ criteria = "safe-to-deploy"
delta = "6.0.1 -> 6.0.2"
notes = "I'm the author of the changes in this version of the crate."
@@ -2394,7 +2614,7 @@ index 1e6a82e..96bb4a7 100644
[[audits.goblin]]
who = "Jan-Erik Rediger "
criteria = "safe-to-deploy"
-@@ -3568,6 +3574,12 @@ criteria = "safe-to-deploy"
+@@ -3775,6 +3781,12 @@ criteria = "safe-to-deploy"
version = "0.14.0"
notes = "Victor and Myk developed this crate at Mozilla."
@@ -2408,10 +2628,10 @@ index 1e6a82e..96bb4a7 100644
who = "Mike Hommey "
criteria = "safe-to-deploy"
diff --git a/supply-chain/config.toml b/supply-chain/config.toml
-index 9e62ee8..6320ee1 100644
+index 2e6d4c1..25e2c3b 100644
--- a/supply-chain/config.toml
+++ b/supply-chain/config.toml
-@@ -72,6 +72,10 @@ notes = "Used for testing."
+@@ -76,6 +76,10 @@ notes = "Used for testing."
dependency-criteria = { tokio-reactor = [], tokio-threadpool = [] }
notes = "The dependencies on tokio-reactor and tokio-threadpools are just a hack to pin the version used by audioipc-{client,server}. Suppress vetting on those for the same reasons behind the policy entries."
@@ -2422,7 +2642,7 @@ index 9e62ee8..6320ee1 100644
[policy.gluesmith]
criteria = "safe-to-run"
notes = "Used for fuzzing."
-@@ -96,6 +100,10 @@ notes = "This crate has two testing-only dependencies which are specified as reg
+@@ -108,6 +112,10 @@ notes = "Patched version of upstream to avoid unnecessary unused dependencies an
audit-as-crates-io = false
notes = "This override is an api-compatible fork with an orthogonal implementation."
@@ -2434,10 +2654,10 @@ index 9e62ee8..6320ee1 100644
audit-as-crates-io = false
notes = "This was originally servo code which Bobby Holley put on crates.io some years ago and that was moved in-tree as first-party code later on."
diff --git a/testing/mozbase/mozinfo/mozinfo/mozinfo.py b/testing/mozbase/mozinfo/mozinfo/mozinfo.py
-index b3fb9d1..f226b4b 100755
+index 79d39f8..18c5dbf 100755
--- a/testing/mozbase/mozinfo/mozinfo/mozinfo.py
+++ b/testing/mozbase/mozinfo/mozinfo/mozinfo.py
-@@ -104,7 +104,7 @@ elif system == "Linux":
+@@ -94,7 +94,7 @@ elif system == "Linux":
info["os"] = "linux"
info["linux_distro"] = distribution
@@ -2553,6 +2773,48 @@ index 9d98d89..0bd4076 100644
} else if (is_chromeos) {
ozone_platform = "x11"
ozone_platform_drm = true
+diff --git a/third_party/chromium/build/toolchain/siso.gni b/third_party/chromium/build/toolchain/siso.gni
+index 94055d5..6f11061 100644
+--- a/third_party/chromium/build/toolchain/siso.gni
++++ b/third_party/chromium/build/toolchain/siso.gni
+@@ -1,30 +1,11 @@
+-# Defines the configuration of siso (next-gen build system)
++# Copyright 2023 The Chromium Authors
++# Use of this source code is governed by a BSD-style license that can be
++# found in the LICENSE file.
+
+-import("//chromium/build/config/gclient_args.gni")
+-
+-# use_siso_default is default value of use_siso.
+-# need to match with autoninja's logic.
+-use_siso_default = false
+-
+-_is_google_corp_machine = false
+-if (path_exists("/usr/bin/gcert") || # linux
+- path_exists("/usr/local/bin/gcert") || # mac
+- path_exists("/c:/gnubby/bin/gcert.exe")) {
+- _is_google_corp_machine = true
+-}
+-
+-_is_ninja_used = path_exists(rebase_path(".ninja_deps", root_build_dir))
+-
+-if (path_exists("//chromium/build/config/siso/.sisoenv") &&
+- defined(build_with_chromium) && build_with_chromium &&
+- _is_google_corp_machine && !_is_ninja_used) {
+- use_siso_default = true
+-}
++# Configuration for AnyAsk/SISO build system
++# Disabled for Haiku - path_exists() not supported
+
+ declare_args() {
+- # Placeholder to allow having use_siso in args.gn file.
+- # Explicit `use_siso` in args.gn can override default.
+- # This is used only for autoninja (to dispatch siso or ninja),
+- # and for use_reclient's default.
+- use_siso = use_siso_default
++ # Disable SISO for Haiku build
++ use_siso = false
+ }
diff --git a/third_party/chromium/build/toolchain/toolchain.gni b/third_party/chromium/build/toolchain/toolchain.gni
index 754f0e3..185b04f 100644
--- a/third_party/chromium/build/toolchain/toolchain.gni
@@ -2608,11 +2870,26 @@ index 9f3dac4..e5ef5a8 100644
*handle = dlopen(lib_name, flags);
if (!*handle) {
+diff --git a/third_party/libwebrtc/.gn b/third_party/libwebrtc/.gn
+index 0d50e80..ef94e44 100644
+--- a/third_party/libwebrtc/.gn
++++ b/third_party/libwebrtc/.gn
+@@ -35,8 +35,8 @@ no_check_targets = [
+ # These are the list of GN files that run exec_script. This allowlist exists
+ # to force additional review for new uses of exec_script, which is strongly
+ # discouraged except for gypi_to_gn calls.
+-exec_script_allowlist = build_dotfile_settings.exec_script_allowlist +
+- [ "//build_overrides/build.gni" ]
++#exec_script_allowlist = build_dotfile_settings.exec_script_allowlist +
++# [ "//build_overrides/build.gni" ]
+
+ # Normally, we'd use 'if (!build_with_mozilla)', but that flag isn't
+ # available yet.
diff --git a/third_party/libwebrtc/BUILD.gn b/third_party/libwebrtc/BUILD.gn
-index 0a9f3e4..0e56cd1 100644
+index da75caa..2dc72ed 100644
--- a/third_party/libwebrtc/BUILD.gn
+++ b/third_party/libwebrtc/BUILD.gn
-@@ -211,7 +211,7 @@ config("common_inherited_config") {
+@@ -212,7 +212,7 @@ config("common_inherited_config") {
target_gen_dir,
]
}
@@ -2621,7 +2898,7 @@ index 0a9f3e4..0e56cd1 100644
defines += [ "WEBRTC_POSIX" ]
}
if (is_ios) {
-@@ -220,7 +220,7 @@ config("common_inherited_config") {
+@@ -221,7 +221,7 @@ config("common_inherited_config") {
"WEBRTC_IOS",
]
}
@@ -2630,7 +2907,7 @@ index 0a9f3e4..0e56cd1 100644
defines += [ "WEBRTC_LINUX" ]
}
if (is_bsd) {
-@@ -232,6 +232,9 @@ config("common_inherited_config") {
+@@ -233,6 +233,9 @@ config("common_inherited_config") {
if (is_fuchsia) {
defines += [ "WEBRTC_FUCHSIA" ]
}
@@ -2641,10 +2918,10 @@ index 0a9f3e4..0e56cd1 100644
defines += [ "WEBRTC_WIN" ]
}
diff --git a/third_party/libwebrtc/modules/desktop_capture/BUILD.gn b/third_party/libwebrtc/modules/desktop_capture/BUILD.gn
-index 84f1254..efec749 100644
+index 5c843cf..87f5d7e 100644
--- a/third_party/libwebrtc/modules/desktop_capture/BUILD.gn
+++ b/third_party/libwebrtc/modules/desktop_capture/BUILD.gn
-@@ -355,6 +355,19 @@ rtc_library("desktop_capture") {
+@@ -352,6 +352,19 @@ rtc_library("desktop_capture") {
]
}
@@ -2664,7 +2941,7 @@ index 84f1254..efec749 100644
if (rtc_use_x11_extensions) {
sources += [
"linux/x11/mouse_cursor_monitor_x11.cc",
-@@ -402,7 +415,7 @@ rtc_library("desktop_capture") {
+@@ -399,7 +412,7 @@ rtc_library("desktop_capture") {
}
if (!is_win && !is_mac && !rtc_use_x11_extensions && !rtc_use_pipewire &&
@@ -2675,7 +2952,7 @@ index 84f1254..efec749 100644
"screen_capturer_null.cc",
diff --git a/third_party/libwebrtc/modules/desktop_capture/haiku/screen_capturer_haiku_impl.cc b/third_party/libwebrtc/modules/desktop_capture/haiku/screen_capturer_haiku_impl.cc
new file mode 100644
-index 0000000..f1569ee
+index 0000000..fe5b937
--- /dev/null
+++ b/third_party/libwebrtc/modules/desktop_capture/haiku/screen_capturer_haiku_impl.cc
@@ -0,0 +1,111 @@
@@ -2749,7 +3026,7 @@ index 0000000..f1569ee
+}
+
+void ScreenCapturerHaiku::CaptureFrame() {
-+ int64_t capture_start_time_nanos = rtc::TimeNanos();
++ int64_t capture_start_time_nanos = TimeNanos();
+ bigtime_t now_ = system_time();
+ if (now_ - lastShot_ > 1000000 / MAX_FPS) {
+ reader_->ReadBitmap(bitmap_, id_ == kDirectScreenId);
@@ -2758,7 +3035,7 @@ index 0000000..f1569ee
+ DesktopRect r = DesktopRect::MakeXYWH(0, 0, bitmap_->Bounds().Width() + 1, bitmap_->Bounds().Height() + 1);
+ std::unique_ptr frame(new BasicDesktopFrame(r.size()));
+ frame->CopyPixelsFrom((const uint8_t*)bitmap_->Bits(), bitmap_->BytesPerRow(), r);
-+ frame->set_capture_time_ms((rtc::TimeNanos() - capture_start_time_nanos) / rtc::kNumNanosecsPerMillisec);
++ frame->set_capture_time_ms((TimeNanos() - capture_start_time_nanos) / kNumNanosecsPerMillisec);
+ callback_->OnCaptureResult(Result::SUCCESS, std::move(frame));
+}
+
@@ -3040,10 +3317,10 @@ index 0000000..a89b4a1
+
+} // namespace webrtc
diff --git a/third_party/libwebrtc/modules/video_capture/BUILD.gn b/third_party/libwebrtc/modules/video_capture/BUILD.gn
-index 8a54710..514d244 100644
+index e32e3ab..d8075f5 100644
--- a/third_party/libwebrtc/modules/video_capture/BUILD.gn
+++ b/third_party/libwebrtc/modules/video_capture/BUILD.gn
-@@ -138,6 +138,20 @@ if (!build_with_chromium || is_linux || is_chromeos) {
+@@ -145,6 +145,20 @@ if (!build_with_chromium || is_linux || is_chromeos) {
if (is_fuchsia) {
sources += [ "video_capture_factory_null.cc" ]
}
@@ -3298,7 +3575,7 @@ index 0000000..cdf5adb
+#endif // MODULES_VIDEO_CAPTURE_MAIN_SOURCE_HAIKU_DEVICE_INFO_HAIKU_H_
diff --git a/third_party/libwebrtc/modules/video_capture/haiku/video_capture_haiku.cc b/third_party/libwebrtc/modules/video_capture/haiku/video_capture_haiku.cc
new file mode 100644
-index 0000000..a2b1a13
+index 0000000..198a54d
--- /dev/null
+++ b/third_party/libwebrtc/modules/video_capture/haiku/video_capture_haiku.cc
@@ -0,0 +1,213 @@
@@ -3335,10 +3612,10 @@ index 0000000..a2b1a13
+
+namespace webrtc {
+namespace videocapturemodule {
-+rtc::scoped_refptr VideoCaptureImpl::Create(
++scoped_refptr VideoCaptureImpl::Create(
+ const char* deviceUniqueId) {
-+ rtc::scoped_refptr implementation(
-+ new rtc::RefCountedObject());
++
++ auto implementation = make_ref_counted();
+
+ if (implementation->Init(deviceUniqueId) != 0)
+ return nullptr;
@@ -3406,7 +3683,7 @@ index 0000000..a2b1a13
+ if (fStatus != B_OK)
+ return -1;
+
-+ fVideoConsumer = new VideoConsumer("Librewolf", NULL, 0);
++ fVideoConsumer = new VideoConsumer("LibreWolf", NULL, 0);
+ fVideoConsumer->SetFrameCallback(MyFrameCallback, (void*)this);
+
+ dormant_node_info dni[30];
@@ -3595,10 +3872,10 @@ index 0000000..fe33782
+
+#endif // MODULES_VIDEO_CAPTURE_MAIN_SOURCE_HAIKU_VIDEO_CAPTURE_HAIKU_H_
diff --git a/third_party/libwebrtc/modules/video_capture/video_capture_factory.cc b/third_party/libwebrtc/modules/video_capture/video_capture_factory.cc
-index 4241afe..3b0d320 100644
+index ffdca82..a31cecd 100644
--- a/third_party/libwebrtc/modules/video_capture/video_capture_factory.cc
+++ b/third_party/libwebrtc/modules/video_capture/video_capture_factory.cc
-@@ -24,7 +24,7 @@ scoped_refptr VideoCaptureFactory::Create(
+@@ -26,7 +26,7 @@ scoped_refptr VideoCaptureFactory::Create(
[[maybe_unused]] const char* deviceUniqueIdUTF8) {
// This is only implemented on pure Linux and WEBRTC_LINUX is defined for
// Android as well
@@ -3607,7 +3884,7 @@ index 4241afe..3b0d320 100644
return nullptr;
#else
return videocapturemodule::VideoCaptureImpl::Create(options,
-@@ -40,7 +40,7 @@ VideoCaptureModule::DeviceInfo* VideoCaptureFactory::CreateDeviceInfo(
+@@ -42,7 +42,7 @@ VideoCaptureModule::DeviceInfo* VideoCaptureFactory::CreateDeviceInfo(
[[maybe_unused]] VideoCaptureOptions* options) {
// This is only implemented on pure Linux and WEBRTC_LINUX is defined for
// Android as well
@@ -3617,10 +3894,10 @@ index 4241afe..3b0d320 100644
#else
return videocapturemodule::VideoCaptureImpl::CreateDeviceInfo(options);
diff --git a/third_party/libwebrtc/rtc_base/BUILD.gn b/third_party/libwebrtc/rtc_base/BUILD.gn
-index 337d7f6..21dca74 100644
+index 82b050a..4a4aa36 100644
--- a/third_party/libwebrtc/rtc_base/BUILD.gn
+++ b/third_party/libwebrtc/rtc_base/BUILD.gn
-@@ -1139,6 +1139,10 @@ rtc_library("ifaddrs_converter") {
+@@ -1158,6 +1158,10 @@ rtc_library("ifaddrs_converter") {
"ifaddrs_converter.h",
]
}
@@ -3632,10 +3909,10 @@ index 337d7f6..21dca74 100644
rtc_library("rolling_accumulator") {
diff --git a/third_party/libwebrtc/rtc_base/logging.cc b/third_party/libwebrtc/rtc_base/logging.cc
-index 4e0b9ac..6eea35e 100644
+index fe82a4b..1fd75f8 100644
--- a/third_party/libwebrtc/rtc_base/logging.cc
+++ b/third_party/libwebrtc/rtc_base/logging.cc
-@@ -120,7 +120,11 @@ std::string LogLineRef::DefaultLogLine() const {
+@@ -114,7 +114,11 @@ std::string LogLineRef::DefaultLogLine() const {
log_output << timestamp;
}
if (thread_id_.has_value()) {
@@ -3648,19 +3925,19 @@ index 4e0b9ac..6eea35e 100644
if (!filename_.empty()) {
#if defined(WEBRTC_ANDROID)
diff --git a/third_party/libwebrtc/rtc_base/physical_socket_server.cc b/third_party/libwebrtc/rtc_base/physical_socket_server.cc
-index 3ec82f3..3244ffb 100644
+index a807079..74f706f 100644
--- a/third_party/libwebrtc/rtc_base/physical_socket_server.cc
+++ b/third_party/libwebrtc/rtc_base/physical_socket_server.cc
-@@ -85,7 +85,7 @@ typedef void* SockOptArg;
-
+@@ -78,7 +78,7 @@
+ typedef void* SockOptArg;
#endif // WEBRTC_POSIX
--#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD) && !defined(__native_client__)
-+#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD) && !defined(__native_client__) && !defined(__HAIKU__)
+-#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD)
++#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD) && !defined(__HAIKU__)
#if defined(WEBRTC_LINUX)
#include
#endif
-@@ -385,7 +385,7 @@ int PhysicalSocket::SetOption(Option opt, int value) {
+@@ -375,7 +375,7 @@ int PhysicalSocket::SetOption(Option opt, int value) {
ecn_ = value;
value = dscp_ + (ecn_ & kEcnMask);
}
@@ -3669,7 +3946,7 @@ index 3ec82f3..3244ffb 100644
if (sopt == IPV6_TCLASS) {
// Set the IPv4 option in all cases to support dual-stack sockets.
// Don't bother checking the return code, as this is expected to fail if
-@@ -529,7 +529,7 @@ int PhysicalSocket::DoReadFromSocket(void* buffer,
+@@ -519,7 +519,7 @@ int PhysicalSocket::DoReadFromSocket(void* buffer,
socklen_t addr_len = sizeof(addr_storage);
sockaddr* addr = reinterpret_cast(&addr_storage);
@@ -3677,9 +3954,9 @@ index 3ec82f3..3244ffb 100644
+#if defined(WEBRTC_POSIX) && !defined(WEBRTC_HAIKU)
int received = 0;
iovec iov = {.iov_base = buffer, .iov_len = length};
- msghdr msg = {.msg_name = nullptr, .msg_namelen = 0, .msg_iov = &iov, .msg_iovlen = 1};
-@@ -714,7 +714,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
- #elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD) || defined(__native_client__)
+ msghdr msg = {.msg_iov = &iov, .msg_iovlen = 1};
+@@ -704,7 +704,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
+ #elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD)
RTC_LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported.";
return -1;
-#elif defined(WEBRTC_POSIX)
@@ -3687,7 +3964,7 @@ index 3ec82f3..3244ffb 100644
*slevel = IPPROTO_IP;
*sopt = IP_MTU_DISCOVER;
break;
-@@ -732,7 +732,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
+@@ -722,7 +722,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
*sopt = TCP_NODELAY;
break;
case OPT_DSCP:
@@ -3696,7 +3973,7 @@ index 3ec82f3..3244ffb 100644
if (family_ == AF_INET6) {
*slevel = IPPROTO_IPV6;
*sopt = IPV6_TCLASS;
-@@ -746,7 +746,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
+@@ -736,7 +736,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
return -1;
#endif
case OPT_SEND_ECN:
@@ -3705,7 +3982,7 @@ index 3ec82f3..3244ffb 100644
if (family_ == AF_INET6) {
*slevel = IPPROTO_IPV6;
*sopt = IPV6_TCLASS;
-@@ -760,7 +760,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
+@@ -750,7 +750,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
return -1;
#endif
case OPT_RECV_ECN:
@@ -3714,7 +3991,7 @@ index 3ec82f3..3244ffb 100644
if (family_ == AF_INET6) {
*slevel = IPPROTO_IPV6;
*sopt = IPV6_RECVTCLASS;
-@@ -779,22 +779,30 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
+@@ -769,22 +769,30 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
*slevel = SOL_SOCKET;
*sopt = SO_KEEPALIVE;
break;
@@ -3745,7 +4022,7 @@ index 3ec82f3..3244ffb 100644
case OPT_TCP_USER_TIMEOUT:
#if defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
*slevel = IPPROTO_TCP;
-@@ -843,7 +851,7 @@ bool SocketDispatcher::Initialize() {
+@@ -833,7 +841,7 @@ bool SocketDispatcher::Initialize() {
#if defined(WEBRTC_WIN)
u_long argp = 1;
ioctlsocket(s_, FIONBIO, &argp);
@@ -3755,11 +4032,11 @@ index 3ec82f3..3244ffb 100644
int value = 1;
// Attempt to get receive packet timestamp from the socket.
diff --git a/third_party/libwebrtc/rtc_base/platform_thread_types.cc b/third_party/libwebrtc/rtc_base/platform_thread_types.cc
-index 712ae2c..e708aa5 100644
+index 697beda..054989e 100644
--- a/third_party/libwebrtc/rtc_base/platform_thread_types.cc
+++ b/third_party/libwebrtc/rtc_base/platform_thread_types.cc
-@@ -16,6 +16,10 @@
- #include
+@@ -21,6 +21,10 @@
+ #endif
#endif
+#if defined(WEBRTC_HAIKU)
@@ -3767,9 +4044,9 @@ index 712ae2c..e708aa5 100644
+#endif
+
#if defined(WEBRTC_WIN)
- #include "rtc_base/arraysize.h"
+ #include
-@@ -46,6 +50,8 @@ PlatformThreadId CurrentThreadId() {
+@@ -50,6 +54,8 @@ PlatformThreadId CurrentThreadId() {
return gettid();
#elif defined(WEBRTC_FUCHSIA)
return zx_thread_self();
@@ -3778,7 +4055,7 @@ index 712ae2c..e708aa5 100644
#elif defined(WEBRTC_LINUX)
return syscall(__NR_gettid);
#elif defined(__EMSCRIPTEN__)
-@@ -120,6 +126,8 @@ void SetCurrentThreadName(const char* name) {
+@@ -124,6 +130,8 @@ void SetCurrentThreadName(const char* name) {
prctl(PR_SET_NAME, reinterpret_cast(name)); // NOLINT
#elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
pthread_setname_np(name);
@@ -3787,23 +4064,8 @@ index 712ae2c..e708aa5 100644
#elif defined(WEBRTC_FUCHSIA)
zx_status_t status = zx_object_set_property(zx_thread_self(), ZX_PROP_NAME,
name, strlen(name));
-diff --git a/third_party/libwebrtc/system_wrappers/BUILD.gn b/third_party/libwebrtc/system_wrappers/BUILD.gn
-index 62e1694..70186bb 100644
---- a/third_party/libwebrtc/system_wrappers/BUILD.gn
-+++ b/third_party/libwebrtc/system_wrappers/BUILD.gn
-@@ -63,7 +63,9 @@ rtc_library("system_wrappers") {
- sources += [ "source/cpu_features_linux.cc" ]
- }
-
-- libs += [ "rt" ]
-+ if (!is_haiku) {
-+ libs += [ "rt" ]
-+ }
- }
-
- if (is_win) {
diff --git a/third_party/libwebrtc/webrtc.gni b/third_party/libwebrtc/webrtc.gni
-index 0a5fbcd..ca04a27 100644
+index 67079c1..22aab18 100644
--- a/third_party/libwebrtc/webrtc.gni
+++ b/third_party/libwebrtc/webrtc.gni
@@ -145,7 +145,7 @@ declare_args() {
@@ -3815,7 +4077,7 @@ index 0a5fbcd..ca04a27 100644
# Set this to use PipeWire on the Wayland display server.
# By default it's only enabled on desktop Linux (excludes ChromeOS) and
-@@ -361,7 +361,7 @@ rtc_opus_dir = "//third_party/opus"
+@@ -359,7 +359,7 @@ rtc_opus_dir = "//third_party/opus"
# Desktop capturer is supported only on Windows, OSX and Linux.
rtc_desktop_capture_supported =
@@ -3824,6 +4086,30 @@ index 0a5fbcd..ca04a27 100644
((is_linux || is_chromeos) && (rtc_use_x11_extensions || rtc_use_pipewire))
###############################################################################
+diff --git a/third_party/llama.cpp/src/llama-mmap.cpp b/third_party/llama.cpp/src/llama-mmap.cpp
+index 519e81b..6389354 100644
+--- a/third_party/llama.cpp/src/llama-mmap.cpp
++++ b/third_party/llama.cpp/src/llama-mmap.cpp
+@@ -23,6 +23,10 @@
+ #endif
+ #endif
+
++#ifdef __HAIKU__
++#undef _POSIX_MEMLOCK_RANGE
++#endif
++
+ #if defined(_WIN32)
+ #define WIN32_LEAN_AND_MEAN
+ #ifndef NOMINMAX
+@@ -448,7 +452,7 @@ void * llama_mmap::addr() const { return pimpl->addr; }
+
+ void llama_mmap::unmap_fragment(size_t first, size_t last) { pimpl->unmap_fragment(first, last); }
+
+-#if defined(_POSIX_MEMLOCK_RANGE) || defined(_WIN32)
++#if defined(_POSIX_MEMLOCK_RANGE) || defined(_WIN32) || defined(__HAIKU__)
+ const bool llama_mmap::SUPPORTED = true;
+ #else
+ const bool llama_mmap::SUPPORTED = false;
diff --git a/third_party/pipewire/pipewire/utils.h b/third_party/pipewire/pipewire/utils.h
index 528f676..8807d9c 100644
--- a/third_party/pipewire/pipewire/utils.h
@@ -4176,13 +4462,13 @@ index 0000000..fc441bb
+]
\ No newline at end of file
diff --git a/third_party/rust/mtu/.cargo-checksum.json b/third_party/rust/mtu/.cargo-checksum.json
-index 4c168fc..30cdf1a 100644
+index bfdbeeb..e111ee5 100644
--- a/third_party/rust/mtu/.cargo-checksum.json
+++ b/third_party/rust/mtu/.cargo-checksum.json
@@ -1 +1 @@
--{"files":{"CODE_OF_CONDUCT.md":"f7b4cba1deaa0a77bd611c04c84ef5b6859e44c8370f7513fe688fb9531b913b","Cargo.lock":"87fd40e386e610a683ac57e8f20cdff83ba1617a8d963f30f23c4dc0f0e94675","Cargo.toml":"5599f073bcf2bd5a3d18b39e5f501ff66543625cfc8f70c5738045158fcbf4a5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"4ad721b5b6a3d39ca3e2202f403d897c4a1d42896486dd58963a81f8e64ef61d","README.md":"24df0e24154b7f0096570ad221aea02bd53a0f1124a2adafff5730af5443a65c","SECURITY.md":"75455814b6cf997e22a927eb979b4356d788583aa1eb96e90853aaab0f82ad1b","build.rs":"a4bcd0562c80914a8e909e8b10507605bfd6f0f268fad9ef4d79f4c48bdaed6c","src/bsd.rs":"d8c078fc5a407df32862f404ead6acdf647e0f79a341f7575562886bfc037ceb","src/lib.rs":"5045fdb6e15886f611a41216c47a284e53532de0c69e1b2d330358ed04acab50","src/linux.rs":"aecc6acbea2419dd6cc31e916148e438d8cec20cf001758042299ff2ccc81d39","src/routesocket.rs":"be837947e2c3f9301a174499217fe8920ff492918bf85ca5eb281eb7ad2240e1","src/windows.rs":"d7e18d55b3be5462d2041fc22fb22cf1fc163ec30b107a3274f2bd22ad618411"},"package":"3e3124fb16267c5a77ce8cd015bcb5bb3f8aab28ec32d89d65f6a31c5c1306a0"}
+-{"files":{".clippy.toml":"6ab1a673bd5c7ba29bd77e62f42183db3ace327c23d446d5b4b0618f6c39d639","Cargo.toml":"b4c4826e5e748da588a67852184dac53e76fe3f31f1b1eb7bb390808688103a5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"4ad721b5b6a3d39ca3e2202f403d897c4a1d42896486dd58963a81f8e64ef61d","README.md":"24df0e24154b7f0096570ad221aea02bd53a0f1124a2adafff5730af5443a65c","SECURITY.md":"75455814b6cf997e22a927eb979b4356d788583aa1eb96e90853aaab0f82ad1b","build.rs":"a4bcd0562c80914a8e909e8b10507605bfd6f0f268fad9ef4d79f4c48bdaed6c","src/bsd.rs":"7641b2a905a5e05505507fdf2e3af37e9c901a997d48759258f9f853cd2ab0e5","src/lib.rs":"6e8702d77e0f211d05862820eec77f2aa8cd8db6ec4de2c5278d223fbd96b31d","src/linux.rs":"aecc6acbea2419dd6cc31e916148e438d8cec20cf001758042299ff2ccc81d39","src/routesocket.rs":"be837947e2c3f9301a174499217fe8920ff492918bf85ca5eb281eb7ad2240e1","src/windows.rs":"d7e18d55b3be5462d2041fc22fb22cf1fc163ec30b107a3274f2bd22ad618411"},"package":null}
\ No newline at end of file
-+{"files":{"CODE_OF_CONDUCT.md":"f7b4cba1deaa0a77bd611c04c84ef5b6859e44c8370f7513fe688fb9531b913b","Cargo.lock":"87fd40e386e610a683ac57e8f20cdff83ba1617a8d963f30f23c4dc0f0e94675","Cargo.toml":"5599f073bcf2bd5a3d18b39e5f501ff66543625cfc8f70c5738045158fcbf4a5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"4ad721b5b6a3d39ca3e2202f403d897c4a1d42896486dd58963a81f8e64ef61d","README.md":"24df0e24154b7f0096570ad221aea02bd53a0f1124a2adafff5730af5443a65c","SECURITY.md":"75455814b6cf997e22a927eb979b4356d788583aa1eb96e90853aaab0f82ad1b","build.rs":"2c51040e4db5d6cbe0cfcc3ed1121c628c254e88dbb1c00a27036ff8c1aa8f26","src/bsd.rs":"d8c078fc5a407df32862f404ead6acdf647e0f79a341f7575562886bfc037ceb","src/lib.rs":"b213b34b5cd1c99c2398c2bc5040394a92426e1f87d9525df88455dedab9daec","src/linux.rs":"aecc6acbea2419dd6cc31e916148e438d8cec20cf001758042299ff2ccc81d39","src/routesocket.rs":"be837947e2c3f9301a174499217fe8920ff492918bf85ca5eb281eb7ad2240e1","src/windows.rs":"d7e18d55b3be5462d2041fc22fb22cf1fc163ec30b107a3274f2bd22ad618411"},"package":"3e3124fb16267c5a77ce8cd015bcb5bb3f8aab28ec32d89d65f6a31c5c1306a0"}
++{"files":{".clippy.toml":"6ab1a673bd5c7ba29bd77e62f42183db3ace327c23d446d5b4b0618f6c39d639","Cargo.toml":"b4c4826e5e748da588a67852184dac53e76fe3f31f1b1eb7bb390808688103a5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"4ad721b5b6a3d39ca3e2202f403d897c4a1d42896486dd58963a81f8e64ef61d","README.md":"24df0e24154b7f0096570ad221aea02bd53a0f1124a2adafff5730af5443a65c","SECURITY.md":"75455814b6cf997e22a927eb979b4356d788583aa1eb96e90853aaab0f82ad1b","build.rs":"2c51040e4db5d6cbe0cfcc3ed1121c628c254e88dbb1c00a27036ff8c1aa8f26","src/bsd.rs":"7641b2a905a5e05505507fdf2e3af37e9c901a997d48759258f9f853cd2ab0e5","src/lib.rs":"cf234181f68c5735c3ee0d9bfb99fb43ca7d9b574795c7cc8fa4e4cfdd5109ee","src/linux.rs":"aecc6acbea2419dd6cc31e916148e438d8cec20cf001758042299ff2ccc81d39","src/routesocket.rs":"be837947e2c3f9301a174499217fe8920ff492918bf85ca5eb281eb7ad2240e1","src/windows.rs":"d7e18d55b3be5462d2041fc22fb22cf1fc163ec30b107a3274f2bd22ad618411"},"package":null}
diff --git a/third_party/rust/mtu/build.rs b/third_party/rust/mtu/build.rs
index a649819..14dbb00 100644
--- a/third_party/rust/mtu/build.rs
@@ -4205,10 +4491,10 @@ index a649819..14dbb00 100644
bindgen::Builder::default()
.header_contents("rtnetlink.h", "#include ")
diff --git a/third_party/rust/mtu/src/lib.rs b/third_party/rust/mtu/src/lib.rs
-index f67a5c3..063cf85 100644
+index 81dc869..06d2f4f 100644
--- a/third_party/rust/mtu/src/lib.rs
+++ b/third_party/rust/mtu/src/lib.rs
-@@ -108,7 +108,7 @@ const fn aligned_by(size: usize, align: usize) -> usize {
+@@ -110,7 +110,7 @@ const fn aligned_by(size: usize, align: usize) -> usize {
// Platforms currently not supported.
//
// See .
@@ -4382,10 +4668,10 @@ index 3e7212f..a95924b 100644
stride = cmsg::decode::(cmsg) as usize;
diff --git a/toolkit/components/processtools/ProcInfo_haiku.cpp b/toolkit/components/processtools/ProcInfo_haiku.cpp
new file mode 100644
-index 0000000..ad41c23
+index 0000000..6c08732
--- /dev/null
+++ b/toolkit/components/processtools/ProcInfo_haiku.cpp
-@@ -0,0 +1,86 @@
+@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
@@ -4398,6 +4684,10 @@ index 0000000..ad41c23
+
+namespace mozilla {
+
++nsresult GetCurrentProcessMemoryUsage(uint64_t* aResult) {
++ return NS_ERROR_NOT_IMPLEMENTED;
++}
++
+int GetCycleTimeFrequencyMHz() { return 0; }
+
+nsresult GetCpuTimeSinceProcessStartInMs(uint64_t* aResult) {
@@ -4812,22 +5102,22 @@ index 46860f6..b010d4d 100644
# else
mRemoteServer = MakeUnique();
diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
-index 161ad33..4c778d8 100644
+index de16e73..a3ba5b4 100644
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
-@@ -347,6 +347,10 @@ if CONFIG["OS_ARCH"] == "Darwin":
- "-weak_framework MediaPlayer",
- ]
+@@ -106,6 +106,10 @@ def Libxul(name, output_category=None):
+ if name == "xul-gtest" and CONFIG["MOZ_LTO_FAT"]:
+ LDFLAGS += ["-fno-lto"]
+if CONFIG["OS_ARCH"] == "Haiku":
+ OS_LIBS += [
+ "be",
+ ]
- if CONFIG["OS_ARCH"] == "WINNT":
- OS_LIBS += [
+ # The real libxul definition is in ./build/moz.build, but we define a
+ # xul library here such that # FINAL_LIBRARY = 'xul' refers to here, which
diff --git a/toolkit/library/rust/moz.build b/toolkit/library/rust/moz.build
-index 34c94a1..56edb0a 100644
+index 2077fba..4390d2b 100644
--- a/toolkit/library/rust/moz.build
+++ b/toolkit/library/rust/moz.build
@@ -8,6 +8,12 @@ include("gkrust-features.mozbuild")
@@ -4844,10 +5134,10 @@ index 34c94a1..56edb0a 100644
# We don't want to enable refcount logging during rusttests, since the
# relevant FFI symbols wouldn't be found.
diff --git a/toolkit/modules/ShortcutUtils.sys.mjs b/toolkit/modules/ShortcutUtils.sys.mjs
-index 3e796cb..005a31d 100644
+index e52e88a..870392c 100644
--- a/toolkit/modules/ShortcutUtils.sys.mjs
+++ b/toolkit/modules/ShortcutUtils.sys.mjs
-@@ -64,7 +64,7 @@ export var ShortcutUtils = {
+@@ -95,7 +95,7 @@ export var ShortcutUtils = {
let elemString = "";
let haveCloverLeaf = false;
if (elemMod.match("accel")) {
@@ -4856,7 +5146,7 @@ index 3e796cb..005a31d 100644
haveCloverLeaf = true;
} else {
elemString +=
-@@ -73,7 +73,7 @@ export var ShortcutUtils = {
+@@ -104,7 +104,7 @@ export var ShortcutUtils = {
}
}
if (elemMod.match("access")) {
@@ -4865,7 +5155,7 @@ index 3e796cb..005a31d 100644
elemString +=
lazy.PlatformKeys.GetStringFromName("VK_CONTROL") +
lazy.PlatformKeys.GetStringFromName("MODIFIER_SEPARATOR");
-@@ -94,14 +94,26 @@ export var ShortcutUtils = {
+@@ -125,14 +125,26 @@ export var ShortcutUtils = {
lazy.PlatformKeys.GetStringFromName("MODIFIER_SEPARATOR");
}
if (elemMod.match("alt")) {
@@ -4898,7 +5188,7 @@ index 3e796cb..005a31d 100644
}
if (elemMod.match("meta") && this.metaKeyIsCommandKey()) {
elemString +=
-@@ -110,9 +122,15 @@ export var ShortcutUtils = {
+@@ -141,9 +153,15 @@ export var ShortcutUtils = {
}
if (haveCloverLeaf) {
@@ -4918,7 +5208,7 @@ index 3e796cb..005a31d 100644
return elemString;
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index 7d849a7..4c5a0be 100644
+index 173d76b..3e4cd0a 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -297,6 +297,8 @@ def audio_backends_default(target):
@@ -4959,7 +5249,16 @@ index 7d849a7..4c5a0be 100644
imply_option(
"--enable-jack", imply_jack, reason="--enable-audio-backends", when=use_pkg_config
)
-@@ -3114,6 +3124,7 @@ def forkserver_default(target, build_project):
+@@ -1757,7 +1767,7 @@ with only_when("--enable-compile-environment"):
+ # being built as position independent.
+ "int main() { return 0; }\nint (*ptr)() = main;",
+ pack_rel_relocs
+- + ["-pie", "-o", path]
++ + ["-fPIC", "-o", path]
+ + (extra_toolchain_flags or [])
+ + linker_ldflags,
+ wrapper=c_compiler.wrapper,
+@@ -3160,6 +3170,7 @@ def forkserver_default(target, build_project):
(target.os == "GNU" and target.kernel == "Linux")
or target.os == "FreeBSD"
or target.os == "OpenBSD"
@@ -4967,7 +5266,7 @@ index 7d849a7..4c5a0be 100644
)
-@@ -3841,7 +3852,7 @@ with only_when(compile_environment):
+@@ -3902,7 +3913,7 @@ with only_when(compile_environment):
@depends(target)
def default_user_appdir(target):
@@ -4976,6 +5275,33 @@ index 7d849a7..4c5a0be 100644
return "Mozilla"
return ".mozilla"
+diff --git a/toolkit/moz.configure.orig b/toolkit/moz.configure.orig
+index b4d96f4..173d76b 100644
+--- a/toolkit/moz.configure.orig
++++ b/toolkit/moz.configure.orig
+@@ -22,19 +22,21 @@ def check_moz_app_id(moz_app_id, build_project):
+
+ project_flag(
+ env="MOZ_APP_VENDOR",
++ default="LibreWolf",
+ nargs=1,
+ help='Used for application.ini\'s "Vendor" field, which also impacts profile location and user-visible fields',
+ )
+
+ project_flag(
+ env="MOZ_APP_UA_NAME",
+- default="",
++ default="Firefox",
+ nargs=1,
+ help="Application name in the User Agent string",
+ )
+
+ project_flag(
+ "MOZ_APP_PROFILE",
++ default="librewolf",
+ nargs=1,
+ help='Used for application.ini\'s "Profile" field, which controls profile location',
+ )
diff --git a/toolkit/system/gnome/moz.build b/toolkit/system/gnome/moz.build
index ce84646..1ebee31 100644
--- a/toolkit/system/gnome/moz.build
@@ -4995,10 +5321,10 @@ index ce84646..1ebee31 100644
]
diff --git a/toolkit/system/gnome/nsGIOService.cpp b/toolkit/system/gnome/nsGIOService.cpp
-index dcc07d8..cdc5eaf 100644
+index 5a0d902..340e4f3 100644
--- a/toolkit/system/gnome/nsGIOService.cpp
+++ b/toolkit/system/gnome/nsGIOService.cpp
-@@ -470,6 +470,32 @@ gboolean g_app_info_launch_default_for_uri_openbsd(const char* uri,
+@@ -493,6 +493,32 @@ gboolean g_app_info_launch_default_for_uri_openbsd(const char* uri,
}
#endif
@@ -5031,7 +5357,7 @@ index dcc07d8..cdc5eaf 100644
static NS_IMETHODIMP LaunchWithURIImpl(RefPtr aInfo, nsIURI* aUri,
const char* aXDGToken = nullptr) {
GList uris = {0};
-@@ -483,6 +509,10 @@ static NS_IMETHODIMP LaunchWithURIImpl(RefPtr aInfo, nsIURI* aUri,
+@@ -506,6 +532,10 @@ static NS_IMETHODIMP LaunchWithURIImpl(RefPtr aInfo, nsIURI* aUri,
gboolean result = g_app_info_launch_uris_openbsd(
aInfo, spec.get(), GetLaunchContext(aXDGToken).get(),
getter_Transfers(error));
@@ -5042,7 +5368,7 @@ index dcc07d8..cdc5eaf 100644
#else
gboolean result = g_app_info_launch_uris(
aInfo, &uris, GetLaunchContext(aXDGToken).get(), getter_Transfers(error));
-@@ -871,6 +901,9 @@ static nsresult ShowURIImpl(nsIURI* aURI, const char* aXDGToken = nullptr) {
+@@ -894,6 +924,9 @@ static nsresult ShowURIImpl(nsIURI* aURI, const char* aXDGToken = nullptr) {
#ifdef __OpenBSD__
if (!g_app_info_launch_default_for_uri_openbsd(
spec.get(), GetLaunchContext(aXDGToken).get(),
@@ -5052,7 +5378,7 @@ index dcc07d8..cdc5eaf 100644
#else
if (!g_app_info_launch_default_for_uri(spec.get(),
GetLaunchContext(aXDGToken).get(),
-@@ -906,6 +939,9 @@ static nsresult LaunchPathImpl(const nsACString& aPath,
+@@ -929,6 +962,9 @@ static nsresult LaunchPathImpl(const nsACString& aPath,
#ifdef __OpenBSD__
g_app_info_launch_default_for_uri_openbsd(spec.get(),
GetLaunchContext(aXDGToken).get(),
@@ -5488,7 +5814,7 @@ index 0000000..d9ac4f3
+
+#endif
diff --git a/toolkit/themes/shared/popup.css b/toolkit/themes/shared/popup.css
-index 9533f5e..973cf1c 100644
+index c2618b8..dceb4c0 100644
--- a/toolkit/themes/shared/popup.css
+++ b/toolkit/themes/shared/popup.css
@@ -44,6 +44,12 @@ panel {
@@ -5517,17 +5843,16 @@ index 0ab59fb..29d5f2d 100644
if CONFIG["ENABLE_WEBDRIVER"]:
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
-index b83637c..c19eaf8 100644
+index 8be44e9..e2b1003 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
-@@ -346,14 +346,16 @@ MOZ_CONSTINIT nsString gProcessStartupShortcut;
+@@ -342,14 +342,16 @@ MOZ_CONSTINIT nsString gProcessStartupShortcut;
# ifdef MOZ_WAYLAND
# include
# include "mozilla/widget/nsWaylandDisplay.h"
--# include "wayland-proxy.h"
+# ifndef XP_HAIKU
-+# include "wayland-proxy.h"
-+# endif /* !XP_HAIKU */
+ # include "wayland-proxy.h"
++# endif
# endif
# ifdef MOZ_X11
# include
@@ -5536,10 +5861,10 @@ index b83637c..c19eaf8 100644
-#if defined(MOZ_WAYLAND)
+#if defined(MOZ_WAYLAND) && !defined(XP_HAIKU)
- MOZ_RUNINIT std::unique_ptr gWaylandProxy;
+ MOZ_CONSTINIT std::unique_ptr gWaylandProxy;
#endif
-@@ -435,6 +437,9 @@ static void UnexpectedExit() {
+@@ -430,6 +432,9 @@ static void UnexpectedExit() {
#if defined(MOZ_WAYLAND)
bool IsWaylandEnabled() {
@@ -5549,7 +5874,7 @@ index b83637c..c19eaf8 100644
static bool isWaylandEnabled = []() {
const char* waylandDisplay = PR_GetEnv("WAYLAND_DISPLAY");
if (!waylandDisplay) {
-@@ -465,6 +470,7 @@ bool IsWaylandEnabled() {
+@@ -460,6 +465,7 @@ bool IsWaylandEnabled() {
return !gtk_check_version(3, 24, 30);
}();
return isWaylandEnabled;
@@ -5557,7 +5882,7 @@ index b83637c..c19eaf8 100644
}
#else
bool IsWaylandEnabled() { return false; }
-@@ -3803,7 +3809,7 @@ class XREMain {
+@@ -3827,7 +3833,7 @@ class XREMain {
#endif
};
@@ -5566,7 +5891,7 @@ index b83637c..c19eaf8 100644
static SmprintfPointer FormatUid(uid_t aId) {
if (const auto pw = getpwuid(aId)) {
return mozilla::Smprintf("%s", pw->pw_name);
-@@ -3852,7 +3858,7 @@ static bool CheckForUserMismatch() {
+@@ -3876,7 +3882,7 @@ static bool CheckForUserMismatch() {
}
return false;
}
@@ -5575,7 +5900,7 @@ index b83637c..c19eaf8 100644
static bool CheckForUserMismatch() { return false; }
#endif
-@@ -4835,7 +4841,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
+@@ -4859,7 +4865,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
// display_name is owned by gdk.
display_name = gdk_get_display_arg_name();
bool waylandEnabled = IsWaylandEnabled();
@@ -5584,7 +5909,7 @@ index b83637c..c19eaf8 100644
if (!display_name) {
auto* proxyEnv = getenv("MOZ_DISABLE_WAYLAND_PROXY");
bool disableWaylandProxy = proxyEnv && *proxyEnv;
-@@ -4890,7 +4896,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
+@@ -4914,7 +4920,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
} else {
gdk_display_manager_open_display(gdk_display_manager_get(), nullptr);
}
@@ -5593,7 +5918,7 @@ index b83637c..c19eaf8 100644
// We want to use proxy for main connection only so
// restore original Wayland display for next potential Wayland connections
// from gfx probe code and so on.
-@@ -6188,7 +6194,9 @@ int XREMain::XRE_main(int argc, char* argv[], const BootstrapConfig& aConfig) {
+@@ -6219,7 +6225,9 @@ int XREMain::XRE_main(int argc, char* argv[], const BootstrapConfig& aConfig) {
if (!gfxPlatform::IsHeadless()) {
# ifdef MOZ_WAYLAND
WaylandDisplayRelease();
@@ -5604,10 +5929,10 @@ index b83637c..c19eaf8 100644
}
#endif
diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp
-index c822fe2..24750f7 100644
+index 612f0fe..95b8361 100644
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
-@@ -348,6 +348,7 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[],
+@@ -347,6 +347,7 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[],
SetupErrorHandling(aArgv[0]);
@@ -5615,7 +5940,7 @@ index c822fe2..24750f7 100644
bool exceptionHandlerIsSet = false;
if (!CrashReporter::IsDummy()) {
auto crashReporterArg = geckoargs::sCrashReporter.Get(aArgc, aArgv);
-@@ -370,6 +371,7 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[],
+@@ -369,6 +370,7 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[],
CrashReporter::UnregisterRuntimeExceptionModule();
}
}
@@ -5623,7 +5948,7 @@ index c822fe2..24750f7 100644
#ifdef MOZ_X11
XInitThreads();
-@@ -601,7 +603,9 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[],
+@@ -600,7 +602,9 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[],
}
}
@@ -5658,10 +5983,10 @@ index 146a586..10b7fb6 100644
"(%s) %s Proxy: %s",
mozilla::widget::GetDesktopEnvironmentIdentifier().get(),
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
-index c7bf964..914a5ea 100644
+index 1e1d76c..7605b7b 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
-@@ -81,6 +81,10 @@
+@@ -82,6 +82,10 @@
#ifdef XP_IOS
# include "UIKitDirProvider.h"
#endif
@@ -5672,7 +5997,7 @@ index c7bf964..914a5ea 100644
#if defined(XP_MACOSX)
# define APP_REGISTRY_NAME "Application Registry"
-@@ -378,7 +382,7 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent,
+@@ -379,7 +383,7 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent,
} else if (!strcmp(aProperty, XRE_MOZ_USER_NATIVE_MANIFESTS)) {
rv = GetUserDataDirectoryHome(getter_AddRefs(file), false);
NS_ENSURE_SUCCESS(rv, rv);
@@ -5681,7 +6006,7 @@ index c7bf964..914a5ea 100644
rv = file->AppendNative("Mozilla"_ns);
# else // defined(XP_MACOSX)
rv = file->AppendNative(".mozilla"_ns);
-@@ -1089,6 +1093,12 @@ nsresult nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile,
+@@ -1090,6 +1094,12 @@ nsresult nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile,
NS_ENSURE_SUCCESS(rv, rv);
MOZ_TRY(NS_NewLocalFile(path, getter_AddRefs(localDir)));
@@ -5694,7 +6019,7 @@ index c7bf964..914a5ea 100644
#elif defined(XP_UNIX)
const char* homeDir = getenv("HOME");
if (!homeDir || !*homeDir) return NS_ERROR_FAILURE;
-@@ -1208,7 +1218,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) {
+@@ -1209,7 +1219,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) {
nsresult rv;
@@ -5703,7 +6028,7 @@ index c7bf964..914a5ea 100644
static const char* const sXR = "LibreWolf";
rv = aFile->AppendNative(nsDependentCString(sXR));
-@@ -1267,7 +1277,7 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* aFile, bool aLocal) {
+@@ -1268,7 +1278,7 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* aFile, bool aLocal) {
}
NS_ENSURE_SUCCESS(rv, rv);
@@ -5712,7 +6037,136 @@ index c7bf964..914a5ea 100644
if (!profile.IsEmpty()) {
rv = AppendProfileString(aFile, profile.get());
} else {
-
+diff --git a/toolkit/xre/nsXREDirProvider.cpp.orig b/toolkit/xre/nsXREDirProvider.cpp.orig
+index a7d365d..1e1d76c 100644
+--- a/toolkit/xre/nsXREDirProvider.cpp.orig
++++ b/toolkit/xre/nsXREDirProvider.cpp.orig
+@@ -280,23 +280,25 @@ nsresult nsXREDirProvider::GetBackgroundTasksProfilesRootDir(
+ * On Linux this is /usr/{lib,lib64}/mozilla
+ * (for 32- and 64-bit systems respsectively)
+ */
+-static nsresult GetSystemParentDirectory(nsIFile** aFile) {
++static nsresult GetSystemParentDirectory(nsIFile** aFile,
++ nsCString aName = "LibreWolf"_ns) {
+ nsresult rv;
+ nsCOMPtr localDir;
+ # if defined(XP_MACOSX)
+ rv = GetOSXFolderType(kOnSystemDisk, kApplicationSupportFolderType,
+ getter_AddRefs(localDir));
+ if (NS_SUCCEEDED(rv)) {
+- rv = localDir->AppendNative("Mozilla"_ns);
++ rv = localDir->AppendNative(aName);
+ }
+ # else
+- constexpr auto dirname =
++ ToLowerCase(aName);
++ nsCString dirname =
+ # ifdef HAVE_USR_LIB64_DIR
+- "/usr/lib64/mozilla"_ns
++ "/usr/lib64/"_ns + aName
+ # elif defined(__OpenBSD__) || defined(__FreeBSD__)
+- "/usr/local/lib/mozilla"_ns
++ "/usr/local/lib/"_ns + aName
+ # else
+- "/usr/lib/mozilla"_ns
++ "/usr/lib/"_ns + aName
+ # endif
+ ;
+ rv = NS_NewNativeLocalFile(dirname, getter_AddRefs(localDir));
+@@ -364,9 +366,19 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent,
+ #if defined(XP_UNIX) || defined(XP_MACOSX)
+ else if (!strcmp(aProperty, XRE_SYS_NATIVE_MANIFESTS)) {
+ rv = ::GetSystemParentDirectory(getter_AddRefs(file));
++ } else if (!strcmp(aProperty, XRE_MOZ_SYS_NATIVE_MANIFESTS)) {
++ rv = ::GetSystemParentDirectory(getter_AddRefs(file), "Mozilla"_ns);
+ } else if (!strcmp(aProperty, XRE_USER_NATIVE_MANIFESTS)) {
+ rv = GetUserDataDirectoryHome(getter_AddRefs(file), false);
+ NS_ENSURE_SUCCESS(rv, rv);
++# if defined(XP_MACOSX)
++ rv = file->AppendNative("LibreWolf"_ns);
++# else // defined(XP_MACOSX)
++ rv = file->AppendNative(".librewolf"_ns);
++# endif // defined(XP_MACOSX)
++ } else if (!strcmp(aProperty, XRE_MOZ_USER_NATIVE_MANIFESTS)) {
++ rv = GetUserDataDirectoryHome(getter_AddRefs(file), false);
++ NS_ENSURE_SUCCESS(rv, rv);
+ # if defined(XP_MACOSX)
+ rv = file->AppendNative("Mozilla"_ns);
+ # else // defined(XP_MACOSX)
+@@ -400,9 +412,10 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent,
+ else if (!strcmp(aProperty, XRE_SYS_SHARE_EXTENSION_PARENT_DIR)) {
+ # ifdef ENABLE_SYSTEM_EXTENSION_DIRS
+ # if defined(__OpenBSD__) || defined(__FreeBSD__)
+- static const char* const sysLExtDir = "/usr/local/share/mozilla/extensions";
++ static const char* const sysLExtDir =
++ "/usr/local/share/librewolf/extensions";
+ # else
+- static const char* const sysLExtDir = "/usr/share/mozilla/extensions";
++ static const char* const sysLExtDir = "/usr/share/librewolf/extensions";
+ # endif
+ rv = NS_NewNativeLocalFile(nsDependentCString(sysLExtDir),
+ getter_AddRefs(file));
+@@ -928,13 +941,7 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult,
+ }
+ appDirPath = Substring(appDirPath, 1, dotIndex - 1);
+
+- bool hasVendor = GetAppVendor() && strlen(GetAppVendor()) != 0;
+- if (hasVendor || GetAppName()) {
+- if (NS_FAILED(localDir->AppendNative(
+- nsDependentCString(hasVendor ? GetAppVendor() : GetAppName())))) {
+- return NS_ERROR_FAILURE;
+- }
+- } else if (NS_FAILED(localDir->AppendNative("Mozilla"_ns))) {
++ if (NS_FAILED(localDir->AppendNative("LibreWolf"_ns))) {
+ return NS_ERROR_FAILURE;
+ }
+
+@@ -1204,7 +1211,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) {
+
+ #if defined(XP_MACOSX) || defined(XP_WIN)
+
+- static const char* const sXR = "Mozilla";
++ static const char* const sXR = "LibreWolf";
+ rv = aFile->AppendNative(nsDependentCString(sXR));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+@@ -1214,7 +1221,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) {
+
+ #elif defined(XP_UNIX)
+
+- static const char* const sXR = ".mozilla";
++ static const char* const sXR = ".librewolf";
+ rv = aFile->AppendNative(nsDependentCString(sXR));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+@@ -1265,10 +1272,6 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* aFile, bool aLocal) {
+ if (!profile.IsEmpty()) {
+ rv = AppendProfileString(aFile, profile.get());
+ } else {
+- if (!vendor.IsEmpty()) {
+- rv = aFile->AppendNative(vendor);
+- NS_ENSURE_SUCCESS(rv, rv);
+- }
+ rv = aFile->AppendNative(appName);
+ }
+ NS_ENSURE_SUCCESS(rv, rv);
+@@ -1300,16 +1303,6 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* aFile, bool aLocal) {
+
+ rv = AppendProfileString(aFile, folder.BeginReading());
+ } else {
+- if (!vendor.IsEmpty()) {
+- folder.Append(vendor);
+- ToLowerCase(folder);
+-
+- rv = aFile->AppendNative(folder);
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- folder.Truncate();
+- }
+-
+ // This can be the case in tests.
+ if (!appName.IsEmpty()) {
+ folder.Append(appName);
diff --git a/tools/profiler/core/ProfilerUtils.cpp b/tools/profiler/core/ProfilerUtils.cpp
index 4c53061..76d3561 100644
--- a/tools/profiler/core/ProfilerUtils.cpp
@@ -5749,10 +6203,10 @@ index c6cc98e..2b77f07 100644
if CONFIG["MOZ_ENABLE_VAAPI"]:
DIRS += ["vaapitest"]
diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp
-index 745711a..f42806b 100644
+index 52b239e..7939786 100644
--- a/widget/gtk/nsWaylandDisplay.cpp
+++ b/widget/gtk/nsWaylandDisplay.cpp
-@@ -23,7 +23,9 @@
+@@ -21,7 +21,9 @@
#include "nsGtkUtils.h"
#include "nsLayoutUtils.h"
#include "nsWindow.h"
@@ -5779,12 +6233,31 @@ index 745711a..f42806b 100644
}
void nsWaylandDisplay::RemovePointer() {
-@@ -768,19 +772,22 @@ static void WlLogHandler(const char* format, va_list args) {
- if (strstr(error, "still attached")) {
- return;
+@@ -876,6 +880,7 @@ void nsWaylandDisplay::WaitForAsyncRoundtrips() {
}
+ }
+
++#ifndef XP_HAIKU
+ // Separate crash functions for different Wayland protocol error patterns.
+ // These functions are marked MOZ_NEVER_INLINE to ensure distinct crash
+ // signatures for different error types, making them easier to track and fix.
+@@ -966,13 +971,14 @@ MOZ_NEVER_INLINE static void WlLogHandler_MarshallingError(const char* error) {
+ GetDesktopEnvironmentIdentifier().get(), error,
+ WaylandProxy::GetState());
+ }
++#endif
+
+ static void WlLogHandler(const char* format, va_list args) {
+ char error[1000];
+ VsprintfLiteral(error, format, args);
+ gfxCriticalNote << "(" << GetDesktopEnvironmentIdentifier().get()
+ << ") Wayland protocol error: " << error;
-
+#ifndef XP_HAIKU
+ // See Bug 1826583 and Bug 1844653 for reference.
+ // "warning: queue %p destroyed while proxies still attached" and variants
+ // like "zwp_linux_dmabuf_feedback_v1@%d still attached" are exceptions on
+@@ -1044,15 +1050,18 @@ static void WlLogHandler(const char* format, va_list args) {
MOZ_CRASH_UNSAFE_PRINTF("(%s) %s Proxy: %s",
GetDesktopEnvironmentIdentifier().get(), error,
WaylandProxy::GetState());
@@ -5804,10 +6277,10 @@ index 745711a..f42806b 100644
nsWaylandDisplay::nsWaylandDisplay(wl_display* aDisplay)
diff --git a/xpcom/base/nsSystemInfo.cpp b/xpcom/base/nsSystemInfo.cpp
-index bd3a68d..52dcddc 100644
+index c4fd591..e8ea8bde 100644
--- a/xpcom/base/nsSystemInfo.cpp
+++ b/xpcom/base/nsSystemInfo.cpp
-@@ -84,6 +84,10 @@
+@@ -82,6 +82,10 @@
# include "mozilla/SandboxInfo.h"
#endif
@@ -5818,7 +6291,7 @@ index bd3a68d..52dcddc 100644
// Slot for NS_InitXPCOM to pass information to nsSystemInfo::Init.
// Only set to nonzero (potentially) if XP_UNIX. On such systems, the
// system call to discover the appropriate value is not thread-safe,
-@@ -1456,7 +1460,15 @@ nsresult nsSystemInfo::Init() {
+@@ -1454,7 +1458,15 @@ nsresult nsSystemInfo::Init() {
SetInt32Property(u"pagesize"_ns, PR_GetPageSize());
SetInt32Property(u"pageshift"_ns, PR_GetPageShift());
SetInt32Property(u"memmapalign"_ns, PR_GetMemMapAlignment());
@@ -5883,33 +6356,11 @@ index 6b566f9..2895ad9 100644
"NetBSD",
"OpenBSD",
"SunOS",
-diff --git a/media/ffvpx/config_unix64.h b/media/ffvpx/config_unix64.h
-index 7d63f47..f72e3bd 100644
---- a/media/ffvpx/config_unix64.h
-+++ b/media/ffvpx/config_unix64.h
-@@ -291,7 +291,7 @@
- #define HAVE_COMMANDLINETOARGVW 0
- #define HAVE_FCNTL 1
- #define HAVE_GETADDRINFO 1
--#define HAVE_GETAUXVAL 1
-+#define HAVE_GETAUXVAL 0
- #define HAVE_GETENV 1
- #define HAVE_GETHRTIME 0
- #define HAVE_GETOPT 1
-@@ -319,7 +319,7 @@
- #define HAVE_NANOSLEEP 1
- #define HAVE_PEEKNAMEDPIPE 0
- #define HAVE_PTHREAD_CANCEL 1
--#define HAVE_SCHED_GETAFFINITY 1
-+#define HAVE_SCHED_GETAFFINITY 0
- #define HAVE_SECITEMIMPORT 0
- #define HAVE_SETCONSOLETEXTATTRIBUTE 0
- #define HAVE_SETCONSOLECTRLHANDLER 0
diff --git a/xpcom/threads/nsProcessCommon.cpp b/xpcom/threads/nsProcessCommon.cpp
-index dbd9993..1431340 100644
+index b4d9998..ccbc6b8 100644
--- a/xpcom/threads/nsProcessCommon.cpp
+++ b/xpcom/threads/nsProcessCommon.cpp
-@@ -43,7 +43,11 @@
+@@ -41,7 +41,11 @@
# include "base/process_util.h"
# endif
# include
@@ -5923,64 +6374,46 @@ index dbd9993..1431340 100644
# include
# include
--
-2.50.1
+2.52.0
-From b94e4a8c930e40defd9fde07db8a3ffc6de42db9 Mon Sep 17 00:00:00 2001
+
+From b31d3140ffab4aa7c8aae88a986e045ed7c446ef Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
-Date: Mon, 6 Oct 2025 13:13:03 +1000
-Subject: Fix timezone
+Date: Tue, 30 Dec 2025 17:46:04 +1000
+Subject: Enable RDD for Haiku by default
-diff --git a/js/src/vm/DateTime.cpp b/js/src/vm/DateTime.cpp
-index ca220ac..f773ef5 100644
---- a/js/src/vm/DateTime.cpp
-+++ b/js/src/vm/DateTime.cpp
-@@ -10,6 +10,15 @@
- # include "mozilla/intl/ICU4CGlue.h"
- # include "mozilla/intl/TimeZone.h"
+diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
+index 0d9a490..5aaa6f5 100644
+--- a/modules/libpref/init/StaticPrefList.yaml
++++ b/modules/libpref/init/StaticPrefList.yaml
+@@ -11542,6 +11542,8 @@
+ value: true
+ #elif defined(XP_SOLARIS)
+ value: true
++#elif defined(XP_HAIKU)
++ value: true
+ #else
+ value: false
+ #endif
+@@ -11621,6 +11623,8 @@
+ value: true
+ #elif defined(XP_SOLARIS)
+ value: true
++#elif defined(XP_HAIKU)
++ value: true
+ #else
+ value: false
+ #endif
+@@ -11661,6 +11665,8 @@
+ value: true
+ #elif defined(XP_SOLARIS)
+ value: true
++#elif defined(XP_HAIKU)
++ value: true
+ #else
+ value: false
#endif
-+
-+#if JS_HAS_INTL_API && defined(__HAIKU__)
-+# pragma GCC visibility push(default)
-+# include
-+# include
-+# include
-+# pragma GCC visibility pop
-+#endif
-+
- #include "mozilla/ScopeExit.h"
- #include "mozilla/Span.h"
- #include "mozilla/TextUtils.h"
-@@ -784,6 +793,21 @@ void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
- return;
- }
-
-+#if defined(__HAIKU__)
-+ BTimeZone timeZone;
-+ if (BLocaleRoster::Default()->GetDefaultTimeZone(&timeZone) == B_OK) {
-+ BString timeZoneID = timeZone.ID();
-+ if (timeZoneID.Length() > 0) {
-+ mozilla::Span tzid(timeZoneID.String(),
-+ timeZoneID.Length());
-+ auto result = mozilla::intl::TimeZone::SetDefaultTimeZone(tzid);
-+ if (result.isOk() && result.unwrap()) {
-+ return;
-+ }
-+ }
-+ }
-+ (void)mozilla::intl::TimeZone::SetDefaultTimeZoneFromHostTimeZone();
-+#else
- if (const char* tzenv = std::getenv("TZ")) {
- std::string_view tz(tzenv);
-
-@@ -845,5 +869,6 @@ void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
- // Intentionally ignore any errors, because we don't have a good way to report
- // errors from this function.
- (void)mozilla::intl::TimeZone::SetDefaultTimeZoneFromHostTimeZone();
--#endif
-+#endif /* __HAIKU__ */
-+#endif /* JS_HAS_INTL_API */
- }
--
-2.50.1
+2.52.0
diff --git a/www-client/librewolf/patches/librewolf_launcher-143.0.4.patchset b/www-client/librewolf/patches/librewolf_launcher-146.0.1.patchset
similarity index 100%
rename from www-client/librewolf/patches/librewolf_launcher-143.0.4.patchset
rename to www-client/librewolf/patches/librewolf_launcher-146.0.1.patchset