pngnq: fix with gcc 14

Various includes are missing.
The zlib include was being patched in before.
The string include is now needed with gcc 14.

Grimmauld f433407a 5c0c4807

+25 -4
+17
pkgs/by-name/pn/pngnq/missing-includes.patch
··· 1 + diff --git a/src/rwpng.c b/src/rwpng.c 2 + index aaa21fc..11d698f 100644 3 + --- a/src/rwpng.c 4 + +++ b/src/rwpng.c 5 + @@ -30,10 +30,12 @@ 6 + ---------------------------------------------------------------------------*/ 7 + 8 + #include <stdio.h> 9 + +#include <string.h> 10 + #include <stdlib.h> 11 + 12 + #include "png.h" /* libpng header; includes zlib.h */ 13 + #include "rwpng.h" /* typedefs, common macros, public prototypes */ 14 + +#include <zlib.h> 15 + 16 + /* future versions of libpng will provide this macro: */ 17 + /* GRR NOTUSED */
+8 -4
pkgs/by-name/pn/pngnq/package.nix
··· 16 16 sha256 = "1qmnnl846agg55i7h4vmrn11lgb8kg6gvs8byqz34bdkjh5gwiy1"; 17 17 }; 18 18 19 + patches = [ 20 + ./missing-includes.patch 21 + ]; 22 + 23 + env.NIX_CFLAGS_COMPILE = toString [ 24 + "-Wno-error=incompatible-pointer-types" 25 + ]; 26 + 19 27 nativeBuildInputs = [ pkg-config ]; 20 28 buildInputs = [ 21 29 libpng 22 30 zlib 23 31 ]; 24 - 25 - patchPhase = '' 26 - sed -i '/png.h/a \#include <zlib.h>' src/rwpng.c 27 - ''; 28 32 29 33 meta = with lib; { 30 34 homepage = "https://pngnq.sourceforge.net/";