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
|
Description: Support for building with libpng >= 1.5
Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Bug-Debian: http://bugs.debian.org/636970
Reviewed-By: Nicholas Breen <nbreen@ofb.net>
Last-Update: 2011-08-16
--- grace-5.1.22.orig/src/rstdrv.c
+++ grace-5.1.22/src/rstdrv.c
@@ -54,6 +54,9 @@
#ifdef HAVE_LIBPNG
# include <png.h>
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+# include <zlib.h>
+#endif
#endif
#ifndef NONE_GUI
@@ -884,8 +887,11 @@ static void rstImagePng(gdImagePtr ihand
png_destroy_write_struct(&png_ptr, NULL);
return;
}
-
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+ if (setjmp(png_jmpbuf((png_ptr)))) {
+#else
if (setjmp(png_ptr->jmpbuf)) {
+#endif
png_destroy_write_struct(&png_ptr, &info_ptr);
return;
}
|