File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 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 */
Original file line number Diff line number Diff line change @@ -16,16 +16,20 @@ stdenv.mkDerivation rec {
1616 sha256 = "1qmnnl846agg55i7h4vmrn11lgb8kg6gvs8byqz34bdkjh5gwiy1" ;
1717 } ;
1818
19+ patches = [
20+ ./missing-includes.patch
21+ ] ;
22+
23+ env . NIX_CFLAGS_COMPILE = toString [
24+ "-Wno-error=incompatible-pointer-types"
25+ ] ;
26+
1927 nativeBuildInputs = [ pkg-config ] ;
2028 buildInputs = [
2129 libpng
2230 zlib
2331 ] ;
2432
25- patchPhase = ''
26- sed -i '/png.h/a \#include <zlib.h>' src/rwpng.c
27- '' ;
28-
2933 meta = with lib ; {
3034 homepage = "https://pngnq.sourceforge.net/" ;
3135 description = "PNG quantizer" ;
You can’t perform that action at this time.
0 commit comments