aboutsummaryrefslogtreecommitdiffstats
path: root/testing/xsane/0001-libpng15.patch
blob: e9f3535d29bb47d057b449fdaa5032e3c6c77089 (plain) (blame)
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
Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>

    Build with libpng15.

--- a/src/xsane-save.c
+++ b/src/xsane-save.c
@@ -4910,7 +4910,11 @@ int xsane_save_png(FILE *outfile, int compression, FILE *imagefile, Image_info *
     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);
@@ -5100,7 +5104,11 @@ int xsane_save_png_16(FILE *outfile, int compression, FILE *imagefile, Image_inf
     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);