xsw: fix GCC 14 build (#372717)

This commit is contained in:
Arne Keller
2025-03-10 16:47:43 +01:00
committed by GitHub
2 changed files with 20 additions and 6 deletions
+9 -6
View File
@@ -39,15 +39,18 @@ stdenv.mkDerivation rec {
SDL_gfx
];
env.NIX_CFLAGS_COMPILE = toString (makeSDLFlags [
SDL
SDL_image
SDL_ttf
SDL_gfx
]);
env.NIX_CFLAGS_COMPILE =
toString (makeSDLFlags [
SDL
SDL_image
SDL_ttf
SDL_gfx
])
+ " -lSDL";
patches = [
./parse.patch # Fixes compilation error by avoiding redundant definitions.
./sdl-error.patch # Adds required include for SDL_GetError.
];
meta = with lib; {
@@ -0,0 +1,11 @@
diff --git a/src/presenter.c b/src/presenter.c
index a082541..74bfbec 100644
--- a/src/presenter.c
+++ b/src/presenter.c
@@ -5,5 +5,6 @@
#include <stdlib.h>
#include "SDL_ttf.h"
+#include <SDL/SDL_error.h>
#include "presenter.h"
#include "execute.h"
#include "list.h"