tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
blobwars: fix build against glibc-2.38
Sergei Trofimovich
2 years ago
a82dceca
06ee4dd6
+13
2 changed files
expand all
collapse all
unified
split
pkgs
games
blobwars
blobwars-2.00-glibc-2.38.patch
default.nix
+11
pkgs/games/blobwars/blobwars-2.00-glibc-2.38.patch
···
1
1
+
--- a/src/headers.h
2
2
+
+++ b/src/headers.h
3
3
+
@@ -56,7 +56,7 @@ extern DECLSPEC int SDLCALL SDL_GetGamma(float *red, float *green, float *blue);
4
4
+
#define textdomain(x) while(false)
5
5
+
#endif
6
6
+
7
7
+
-#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__)
8
8
+
+#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__) && !(defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 38)
9
9
+
static inline void strlcat(char *dest, const char *src, size_t n) { strncat(dest, src, n - 1); }
10
10
+
static inline void strlcpy(char *dest, const char *src, size_t n) { strncpy(dest, src, n); dest[n - 1] = 0; }
11
11
+
#endif
+2
pkgs/games/blobwars/default.nix
···
9
9
sha256 = "c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99";
10
10
};
11
11
12
12
+
patches = [ ./blobwars-2.00-glibc-2.38.patch ];
13
13
+
12
14
nativeBuildInputs = [ pkg-config gettext ];
13
15
buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf zlib ];
14
16
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error" ];