Skip to content

Commit f6da8b0

Browse files
xsw: fix GCC 14 build (#372717)
2 parents 3294be9 + 72b0269 commit f6da8b0

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

pkgs/applications/misc/xsw/default.nix

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,18 @@ stdenv.mkDerivation rec {
3939
SDL_gfx
4040
];
4141

42-
env.NIX_CFLAGS_COMPILE = toString (makeSDLFlags [
43-
SDL
44-
SDL_image
45-
SDL_ttf
46-
SDL_gfx
47-
]);
42+
env.NIX_CFLAGS_COMPILE =
43+
toString (makeSDLFlags [
44+
SDL
45+
SDL_image
46+
SDL_ttf
47+
SDL_gfx
48+
])
49+
+ " -lSDL";
4850

4951
patches = [
5052
./parse.patch # Fixes compilation error by avoiding redundant definitions.
53+
./sdl-error.patch # Adds required include for SDL_GetError.
5154
];
5255

5356
meta = with lib; {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff --git a/src/presenter.c b/src/presenter.c
2+
index a082541..74bfbec 100644
3+
--- a/src/presenter.c
4+
+++ b/src/presenter.c
5+
@@ -5,5 +5,6 @@
6+
#include <stdlib.h>
7+
#include "SDL_ttf.h"
8+
+#include <SDL/SDL_error.h>
9+
#include "presenter.h"
10+
#include "execute.h"
11+
#include "list.h"

0 commit comments

Comments
 (0)