pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ladybird-git: fix some NetBSD-specific issues
Module Name: pkgsrc-wip
Committed By: Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By: tnn
Date: Fri May 9 10:30:56 2025 +0200
Changeset: aeead445e65b2372a14aeefac78245faf318fe5a
Added Files:
ladybird-git/patches/patch-Libraries_LibJS_Runtime_ExecutionContext.h
ladybird-git/patches/patch-Libraries_LibTest_CrashTest.cpp
ladybird-git/patches/patch-Tests_LibJS_test262-runner.cpp
Log Message:
ladybird-git: fix some NetBSD-specific issues
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=aeead445e65b2372a14aeefac78245faf318fe5a
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
...atch-Libraries_LibJS_Runtime_ExecutionContext.h | 13 +++++++++++++
.../patches/patch-Libraries_LibTest_CrashTest.cpp | 22 ++++++++++++++++++++++
.../patches/patch-Tests_LibJS_test262-runner.cpp | 22 ++++++++++++++++++++++
3 files changed, 57 insertions(+)
diffs:
diff --git a/ladybird-git/patches/patch-Libraries_LibJS_Runtime_ExecutionContext.h b/ladybird-git/patches/patch-Libraries_LibJS_Runtime_ExecutionContext.h
new file mode 100644
index 0000000000..a8ddd33325
--- /dev/null
+++ b/ladybird-git/patches/patch-Libraries_LibJS_Runtime_ExecutionContext.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- Libraries/LibJS/Runtime/ExecutionContext.h.orig 2025-05-09 07:27:30.947037549 +0000
++++ Libraries/LibJS/Runtime/ExecutionContext.h
+@@ -121,7 +121,7 @@ private:
+ + (((registers_and_constants_and_locals_count) + (arguments_count)) \
+ * sizeof(JS::Value)); \
+ \
+- void* execution_context_memory = alloca(execution_context_size); \
++ void* execution_context_memory = __builtin_alloca(execution_context_size); \
+ \
+ execution_context = new (execution_context_memory) \
+ JS::ExecutionContext((registers_and_constants_and_locals_count), (arguments_count)); \
diff --git a/ladybird-git/patches/patch-Libraries_LibTest_CrashTest.cpp b/ladybird-git/patches/patch-Libraries_LibTest_CrashTest.cpp
new file mode 100644
index 0000000000..bcd919a168
--- /dev/null
+++ b/ladybird-git/patches/patch-Libraries_LibTest_CrashTest.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- Libraries/LibTest/CrashTest.cpp.orig 2025-05-09 08:07:32.093318354 +0000
++++ Libraries/LibTest/CrashTest.cpp
+@@ -12,7 +12,7 @@
+ #include <sys/wait.h>
+ #include <unistd.h>
+
+-#if !defined(AK_OS_MACOS) && !defined(AK_OS_EMSCRIPTEN) && !defined(AK_OS_GNU_HURD)
++#if !defined(AK_OS_MACOS) && !defined(AK_OS_EMSCRIPTEN) && !defined(AK_OS_GNU_HURD) && !defined(AK_OS_NETBSD)
+ # include <sys/prctl.h>
+ #endif
+
+@@ -41,7 +41,7 @@ bool Crash::run(RunType run_type)
+ #if defined(AK_OS_GNU_HURD)
+ // When we crash, just kill the program, don't dump core.
+ setenv("CRASHSERVER", "/servers/crash-kill", true);
+-#elif !defined(AK_OS_MACOS) && !defined(AK_OS_EMSCRIPTEN)
++#elif defined(PR_SET_DUMPABLE)
+ if (prctl(PR_SET_DUMPABLE, 0, 0, 0) < 0)
+ perror("prctl(PR_SET_DUMPABLE)");
+ #endif
diff --git a/ladybird-git/patches/patch-Tests_LibJS_test262-runner.cpp b/ladybird-git/patches/patch-Tests_LibJS_test262-runner.cpp
new file mode 100644
index 0000000000..1b1ea3a7d4
--- /dev/null
+++ b/ladybird-git/patches/patch-Tests_LibJS_test262-runner.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- Tests/LibJS/test262-runner.cpp.orig 2025-05-05 13:40:56.000000000 +0000
++++ Tests/LibJS/test262-runner.cpp
+@@ -27,7 +27,7 @@
+ #include <signal.h>
+ #include <unistd.h>
+
+-#if !defined(AK_OS_MACOS) && !defined(AK_OS_EMSCRIPTEN) && !defined(AK_OS_GNU_HURD)
++#if !defined(AK_OS_MACOS) && !defined(AK_OS_EMSCRIPTEN) && !defined(AK_OS_GNU_HURD) && !defined(AK_OS_NETBSD)
+ // Only used to disable core dumps
+ # include <sys/prctl.h>
+ #endif
+@@ -592,7 +592,7 @@ int main(int argc, char** argv)
+ #ifdef AK_OS_GNU_HURD
+ if (disable_core_dumping)
+ setenv("CRASHSERVER", "/servers/crash-kill", true);
+-#elif !defined(AK_OS_MACOS) && !defined(AK_OS_EMSCRIPTEN)
++#elif defined(PR_SET_DUMPABLE)
+ if (disable_core_dumping && prctl(PR_SET_DUMPABLE, 0, 0, 0) < 0) {
+ perror("prctl(PR_SET_DUMPABLE)");
+ return exit_wrong_arguments;
Home |
Main Index |
Thread Index |
Old Index