1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 12:42:24 +00:00

Fix visualboyadvance compilation with libpng-1.5; patch from gentoo

svn path=/nixpkgs/branches/libpng15/; revision=29651
This commit is contained in:
Yury G. Kudryashov 2011-10-05 06:33:10 +00:00
parent 935d94c92a
commit 8b511df7b9
2 changed files with 14 additions and 1 deletions

View file

@ -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

View file

@ -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;