mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-18 20:16:51 +02:00
30 lines
927 B
Diff
30 lines
927 B
Diff
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);
|