* [PATCH 1/2] sandbox: sdl: fix compilation on musl-libc
@ 2025-03-14 15:14 Jules Maselbas
2025-03-14 15:14 ` [PATCH 2/2] sandbox: sdl: make window variable static Jules Maselbas
0 siblings, 1 reply; 2+ messages in thread
From: Jules Maselbas @ 2025-03-14 15:14 UTC (permalink / raw)
To: barebox; +Cc: Jules Maselbas
fails to compile with "unknown type name 'loff_t'; did you mean 'off_t'"
error, add missing include and also define _GNU_SOURCE
Signed-off-by: Jules Maselbas <jmaselbas@zdiv.net>
---
arch/sandbox/os/sdl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/sandbox/os/sdl.c b/arch/sandbox/os/sdl.c
index 87c8265ea9..0c31b6ce87 100644
--- a/arch/sandbox/os/sdl.c
+++ b/arch/sandbox/os/sdl.c
@@ -3,8 +3,11 @@
* Copyright (c) 2021 Ahmad Fatoum
*/
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdbool.h>
+#include <stdint.h>
+#include <fcntl.h>
#include <SDL.h>
#include <mach/linux.h>
--
2.48.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] sandbox: sdl: make window variable static
2025-03-14 15:14 [PATCH 1/2] sandbox: sdl: fix compilation on musl-libc Jules Maselbas
@ 2025-03-14 15:14 ` Jules Maselbas
0 siblings, 0 replies; 2+ messages in thread
From: Jules Maselbas @ 2025-03-14 15:14 UTC (permalink / raw)
To: barebox; +Cc: Jules Maselbas
the `window` variable doesn't seems to be used outside of this file,
thus doesn't need to be exported and can be made static.
Signed-off-by: Jules Maselbas <jmaselbas@zdiv.net>
---
arch/sandbox/os/sdl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sandbox/os/sdl.c b/arch/sandbox/os/sdl.c
index 0c31b6ce87..e4c6f1a587 100644
--- a/arch/sandbox/os/sdl.c
+++ b/arch/sandbox/os/sdl.c
@@ -18,7 +18,7 @@ static void sdl_perror(const char *what)
static struct sdl_fb_info info;
static SDL_atomic_t shutdown;
-SDL_Window *window;
+static SDL_Window *window;
static void handle_sdl_events(void)
{
--
2.48.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-14 15:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-14 15:14 [PATCH 1/2] sandbox: sdl: fix compilation on musl-libc Jules Maselbas
2025-03-14 15:14 ` [PATCH 2/2] sandbox: sdl: make window variable static Jules Maselbas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox