Package: slashem / 0.0.7E7F3-7

fix-libpng15-ftbfs.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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;