mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
blobwars: fix build against glibc-2.38
This commit is contained in:
parent
06ee4dd693
commit
a82dceca5e
11
pkgs/games/blobwars/blobwars-2.00-glibc-2.38.patch
Normal file
11
pkgs/games/blobwars/blobwars-2.00-glibc-2.38.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/headers.h
|
||||
+++ b/src/headers.h
|
||||
@@ -56,7 +56,7 @@ extern DECLSPEC int SDLCALL SDL_GetGamma(float *red, float *green, float *blue);
|
||||
#define textdomain(x) while(false)
|
||||
#endif
|
||||
|
||||
-#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__)
|
||||
+#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__) && !(defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 38)
|
||||
static inline void strlcat(char *dest, const char *src, size_t n) { strncat(dest, src, n - 1); }
|
||||
static inline void strlcpy(char *dest, const char *src, size_t n) { strncpy(dest, src, n); dest[n - 1] = 0; }
|
||||
#endif
|
@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99";
|
||||
};
|
||||
|
||||
patches = [ ./blobwars-2.00-glibc-2.38.patch ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config gettext ];
|
||||
buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf zlib ];
|
||||
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error" ];
|
||||
|
Loading…
Reference in New Issue
Block a user