Package: xsane / 0.998-6

fix_png15.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
Description: Build with libpng15.
Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Bug-Debian: http://bugs.debian.org/649800
Forwarded: no

Index: xsane-0.998/src/xsane-save.c
===================================================================
--- xsane-0.998.orig/src/xsane-save.c	2013-01-27 01:44:39.000000000 +0100
+++ xsane-0.998/src/xsane-save.c	2013-01-29 00:17:56.934234295 +0100
@@ -4928,8 +4928,11 @@
     xsane_back_gtk_error(buf, TRUE);
     return -1; /* error */
   }
-
+#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
+  if ( setjmp( png_jmpbuf ( png_ptr ) ) )
+#else
   if (setjmp(png_ptr->jmpbuf))
+#endif
   {
     snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, ERR_LIBPNG);
     xsane_back_gtk_error(buf, TRUE);
@@ -5119,7 +5122,11 @@
     return -1; /* error */
   }
 
+#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
+  if ( setjmp( png_jmpbuf ( png_ptr ) ) )
+#else
   if (setjmp(png_ptr->jmpbuf))
+#endif
   {
     snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, ERR_LIBPNG);
     xsane_back_gtk_error(buf, TRUE);