LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File enigma-1.01-png15.patch of Package enigma (Project games)

diff -Naur enigma-1.01.orig/lib-src/enigma-core/IMG_SavePNG.c enigma-1.01/lib-src/enigma-core/IMG_SavePNG.c
--- enigma-1.01.orig/lib-src/enigma-core/IMG_SavePNG.c	2005-11-25 00:17:06.000000000 +0100
+++ enigma-1.01/lib-src/enigma-core/IMG_SavePNG.c	2013-01-21 23:11:57.190263818 +0100
@@ -84,7 +84,11 @@
                 png_bytep *row_pointers = 0;
 
                 /* Set error handling. */
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+                if (setjmp(png_jmpbuf(png_ptr))) {
+#else
                 if (setjmp(png_ptr->jmpbuf)) {
+#endif
                     IMG_SetError("Error writing the PNG file");
                 }
                 else {