Description: Fix FTBFS with libpng 1.5.
Forwarded: http://sourceforge.net/support/tracker.php?aid=3526441
Origin: http://lists.fedoraproject.org/pipermail/scm-commits/2012-January/719482.html
Author: Iain Arnell <iarnell@gmail.com>
Bug-Debian: http://bugs.debian.org/649807
Last-Update: 05-13-2012
--- a/win/gl/gl_image.c
+++ b/win/gl/gl_image.c
@@ -495,7 +495,7 @@
/* set error handling since we are using the setjmp/longjmp method
* (this is the normal method of doing things with libpng).
*/
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
sdlgl_warning("Problem within LibPNG (unknown)\n");
goto failed;
--- a/win/share/tile2png.c
+++ b/win/share/tile2png.c
@@ -26,6 +26,7 @@
#undef blue
#include <png.h>
+#include <zlib.h>
#include <assert.h>
@@ -104,7 +105,7 @@
/* set error handling since we are using the setjmp/longjmp method
* (this is the normal method of doing things with libpng).
*/
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
fprintf(stderr, "tile2png: Unknown problem while writing PNG.\n");
goto failed;