blobwars: fix build against glibc-2.38

+13
+11
pkgs/games/blobwars/blobwars-2.00-glibc-2.38.patch
···
··· 1 + --- a/src/headers.h 2 + +++ b/src/headers.h 3 + @@ -56,7 +56,7 @@ extern DECLSPEC int SDLCALL SDL_GetGamma(float *red, float *green, float *blue); 4 + #define textdomain(x) while(false) 5 + #endif 6 + 7 + -#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__) 8 + +#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__) && !(defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 38) 9 + static inline void strlcat(char *dest, const char *src, size_t n) { strncat(dest, src, n - 1); } 10 + static inline void strlcpy(char *dest, const char *src, size_t n) { strncpy(dest, src, n); dest[n - 1] = 0; } 11 + #endif
+2
pkgs/games/blobwars/default.nix
··· 9 sha256 = "c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99"; 10 }; 11 12 nativeBuildInputs = [ pkg-config gettext ]; 13 buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf zlib ]; 14 env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error" ];
··· 9 sha256 = "c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99"; 10 }; 11 12 + patches = [ ./blobwars-2.00-glibc-2.38.patch ]; 13 + 14 nativeBuildInputs = [ pkg-config gettext ]; 15 buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf zlib ]; 16 env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error" ];