aboutsummaryrefslogtreecommitdiffstats
path: root/testing/xsane/0001-libpng15.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/xsane/0001-libpng15.patch')
-rw-r--r--testing/xsane/0001-libpng15.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/xsane/0001-libpng15.patch b/testing/xsane/0001-libpng15.patch
new file mode 100644
index 0000000000..e9f3535d29
--- /dev/null
+++ b/testing/xsane/0001-libpng15.patch
@@ -0,0 +1,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);