diff --git a/pkgs/misc/emulators/VisualBoyAdvance/default.nix b/pkgs/misc/emulators/VisualBoyAdvance/default.nix index 964a0491adb4..95f7d9433f9b 100644 --- a/pkgs/misc/emulators/VisualBoyAdvance/default.nix +++ b/pkgs/misc/emulators/VisualBoyAdvance/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { url = mirror://sourceforge/vba/VisualBoyAdvance-src-1.7.2.tar.gz; sha256 = "1dr9w5i296dyq2gbx7sijk6p375aqnwld2n6rwnbzm2g3a94y4gl"; }; - patches = [ ./fix.diff ]; # patch to shut up lost of precision errors + patches = [ ./libpng15.patch ./fix.diff ]; # patch to shut up lost of precision errors preConfigure = '' # Fix errors with invalid conversion from 'const char*' to 'char*' sed -i -e "s|char \* p = strrchr|const char * p = strrchr|g" src/GBA.cpp diff --git a/pkgs/misc/emulators/VisualBoyAdvance/libpng15.patch b/pkgs/misc/emulators/VisualBoyAdvance/libpng15.patch new file mode 100644 index 000000000000..b6f8872ce2bb --- /dev/null +++ b/pkgs/misc/emulators/VisualBoyAdvance/libpng15.patch @@ -0,0 +1,13 @@ +From Gentoo. Fixes compilation with libpng-1.5 + +--- a/src/Util.cpp ++++ b/src/Util.cpp +@@ -79,7 +79,7 @@ + return false; + } + +- if(setjmp(png_ptr->jmpbuf)) { ++ if(setjmp(png_jmpbuf(png_ptr))) { + png_destroy_write_struct(&png_ptr,NULL); + fclose(fp); + return false;