Author: Nobuhiro Iwamatsu 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);