ports: Add butterscotch port
This commit is contained in:
41
ports/butterscotch/patches/0001-include-alloca.h.patch
Normal file
41
ports/butterscotch/patches/0001-include-alloca.h.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From 1ae068333558eec65a11e575d3c08111efd85938 Mon Sep 17 00:00:00 2001
|
||||
From: Oskari Alaranta <oskari.alaranta@bananymous.com>
|
||||
Date: Mon, 22 Jun 2026 21:21:36 +0300
|
||||
Subject: [PATCH] include alloca.h
|
||||
|
||||
---
|
||||
src/runner.c | 4 ++++
|
||||
vendor/stb/vorbis/stb_vorbis.c | 2 +-
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/runner.c b/src/runner.c
|
||||
index 411ccf5..24110c1 100644
|
||||
--- a/src/runner.c
|
||||
+++ b/src/runner.c
|
||||
@@ -17,6 +17,10 @@
|
||||
#include "gettime.h"
|
||||
#include "stb_ds.h"
|
||||
|
||||
+#ifdef __banan_os__
|
||||
+#include <alloca.h>
|
||||
+#endif
|
||||
+
|
||||
// ===[ Runtime Layer Teardown Helpers ]===
|
||||
void Runner_freeRuntimeLayer(RuntimeLayer* runtimeLayer) {
|
||||
free(runtimeLayer->dynamicName);
|
||||
diff --git a/vendor/stb/vorbis/stb_vorbis.c b/vendor/stb/vorbis/stb_vorbis.c
|
||||
index 0af6406..d35822e 100644
|
||||
--- a/vendor/stb/vorbis/stb_vorbis.c
|
||||
+++ b/vendor/stb/vorbis/stb_vorbis.c
|
||||
@@ -588,7 +588,7 @@ enum STBVorbisError
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
- #if defined(__linux__) || defined(__linux) || defined(__sun__) || defined(__EMSCRIPTEN__) || defined(__NEWLIB__)
|
||||
+ #if defined(__linux__) || defined(__linux) || defined(__sun__) || defined(__EMSCRIPTEN__) || defined(__NEWLIB__) || defined(__banan_os__)
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
#else // STB_VORBIS_NO_CRT
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 98fffc5330e51a0dbe25017653d46e15c185dc4b Mon Sep 17 00:00:00 2001
|
||||
From: Oskari Alaranta <oskari.alaranta@bananymous.com>
|
||||
Date: Mon, 22 Jun 2026 21:24:07 +0300
|
||||
Subject: [PATCH] fix maybe used uninitialized error
|
||||
|
||||
---
|
||||
src/desktop/backends/sdl2.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/desktop/backends/sdl2.c b/src/desktop/backends/sdl2.c
|
||||
index 91029a6..34716f8 100644
|
||||
--- a/src/desktop/backends/sdl2.c
|
||||
+++ b/src/desktop/backends/sdl2.c
|
||||
@@ -50,7 +50,7 @@ bool platformGetScaledWindowSize(int32_t* outW, int32_t* outH) {
|
||||
|
||||
static void platformGetWindowScale(float *scale_x, float *scale_y) {
|
||||
if (!scale_x || !scale_y) return;
|
||||
- int32_t draw_w, draw_h;
|
||||
+ int32_t draw_w = 0, draw_h = 0;
|
||||
int logical_w, logical_h;
|
||||
platformGetWindowSize(&draw_w, &draw_h);
|
||||
SDL_GetWindowSize(window, &logical_w, &logical_h);
|
||||
--
|
||||
2.54.0
|
||||
|
||||
Reference in New Issue
Block a user