Skip to content

Commit 811b9fb

Browse files
committed
basilisk: Add patches.
1 parent 00ce7e7 commit 811b9fb

5 files changed

+898
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- platform/ipc/chromium/src/third_party/libevent/kqueue.c.orig 2025-10-15 19:46:52.000000000 +0200
2+
+++ platform/ipc/chromium/src/third_party/libevent/kqueue.c 2025-12-03 16:26:33.558111547 +0100
3+
@@ -49,7 +49,7 @@
4+
/* Some platforms apparently define the udata field of struct kevent as
5+
* intptr_t, whereas others define it as void*. There doesn't seem to be an
6+
* easy way to tell them apart via autoconf, so we need to use OS macros. */
7+
-#if defined(_EVENT_HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__)
8+
+#if defined(_EVENT_HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__darwin__) && !defined(__APPLE__)
9+
#define PTR_TO_UDATA(x) ((intptr_t)(x))
10+
#define INT_TO_UDATA(x) ((intptr_t)(x))
11+
#else
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--- platform/media/ffvpx/config_unix_ppc.h.orig 2025-10-15 19:46:52.000000000 +0200
2+
+++ platform/media/ffvpx/config_unix_ppc.h 2025-12-04 09:40:13.469799012 +0100
3+
@@ -339,10 +339,19 @@
4+
#define HAVE_NANOSLEEP 1
5+
#define HAVE_PEEKNAMEDPIPE 0
6+
#define HAVE_POSIX_MEMALIGN 1
7+
+#if defined(__linux__)
8+
#define HAVE_PRCTL 1
9+
+#else
10+
+#define HAVE_PRCTL 0
11+
+#endif
12+
#define HAVE_PTHREAD_CANCEL 1
13+
+#if defined(__NetBSD__)
14+
+#define HAVE_PTHREAD_SET_NAME_NP 1
15+
+#define HAVE_PTHREAD_SETNAME_NP 1
16+
+#else
17+
#define HAVE_PTHREAD_SET_NAME_NP 0
18+
#define HAVE_PTHREAD_SETNAME_NP 0
19+
+#endif
20+
#define HAVE_SCHED_GETAFFINITY 1
21+
#define HAVE_SECITEMIMPORT 0
22+
#define HAVE_SETCONSOLETEXTATTRIBUTE 0
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
$NetBSD: patch-platform_layout_base_FrameProperties.h,v 1.1 2025/12/14 18:05:18 martin Exp $
2+
3+
Fix crash on big endian 32bit platforms.
4+
Just start the browser and press F12 for dev tools.
5+
6+
--- platform/layout/base/FrameProperties.h.orig 2025-10-15 19:46:52.000000000 +0200
7+
+++ platform/layout/base/FrameProperties.h 2025-12-14 09:14:24.451706944 +0100
8+
@@ -310,15 +310,35 @@
9+
10+
static uint64_t ToInternalValue(PropertyType<T> aValue)
11+
{
12+
- uint64_t v = 0;
13+
- memcpy(&v, &aValue, sizeof(aValue));
14+
- return v;
15+
+#ifndef _LP64
16+
+ if (sizeof(PropertyType<T>) <= sizeof(uint32_t)) {
17+
+ // make sure to loose the unimportant half on 32bit architectures
18+
+ uint32_t v = 0;
19+
+ memcpy(&v, &aValue, sizeof(aValue));
20+
+ return v;
21+
+ } else {
22+
+#endif
23+
+ uint64_t v = 0;
24+
+ memcpy(&v, &aValue, sizeof(aValue));
25+
+ return v;
26+
+#ifndef _LP64
27+
+ }
28+
+#endif
29+
}
30+
31+
static PropertyType<T> FromInternalValue(uint64_t aInternalValue)
32+
{
33+
PropertyType<T> value;
34+
- memcpy(&value, &aInternalValue, sizeof(value));
35+
+#ifndef _LP64
36+
+ if (sizeof(value) <= sizeof(uint32_t)) {
37+
+ uint32_t v32 = (uint32_t)aInternalValue;
38+
+ memcpy(&value, &v32, sizeof(value));
39+
+ } else {
40+
+#endif
41+
+ memcpy(&value, &aInternalValue, sizeof(value));
42+
+#ifndef _LP64
43+
+ }
44+
+#endif
45+
return value;
46+
}
47+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$NetBSD: patch-platform_media_ffvpx_config.h,v 1.1 2025/11/23 10:59:28 nia Exp $
2+
3+
Add pregenerated config for sparc64.
4+
This has been accepted upstream.
5+
6+
--- platform/media/ffvpx/config.h.orig 2025-10-15 17:46:52.000000000 +0000
7+
+++ platform/media/ffvpx/config.h
8+
@@ -41,6 +41,8 @@
9+
#include "config_unix_aarch64.h"
10+
#elif defined(__powerpc__)
11+
#include "config_unix_ppc.h"
12+
+#elif defined(__sparcv9) || defined(__sparcv9__)
13+
+#include "config_unix_sparc64.h"
14+
#else
15+
#if defined(HAVE_64BIT_BUILD)
16+
#include "config_unix64.h"

0 commit comments

Comments
 (0)