Blame SOURCES/plotutils-2.6-png15.patch

c30a5a
diff -up plotutils-2.6/libplot/z_write.c.png15 plotutils-2.6/libplot/z_write.c
c30a5a
--- plotutils-2.6/libplot/z_write.c.png15	2008-07-15 20:54:10.000000000 -0400
c30a5a
+++ plotutils-2.6/libplot/z_write.c	2012-03-22 13:26:48.251676137 -0400
c30a5a
@@ -164,7 +164,11 @@ _pl_z_maybe_output_image (S___(Plotter *
c30a5a
     }
c30a5a
 
c30a5a
   /* cleanup after libpng errors (error handler does a longjmp) */
c30a5a
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
c30a5a
+  if (setjmp (png_jmpbuf(png_ptr)))
c30a5a
+#else
c30a5a
   if (setjmp (png_ptr->jmpbuf))
c30a5a
+#endif
c30a5a
     {
c30a5a
       png_destroy_write_struct (&png_ptr, (png_info **)NULL);
c30a5a
       return -1;
c30a5a
@@ -444,7 +448,11 @@ _our_error_fn_stdio (png_struct *png_ptr
c30a5a
 #endif
c30a5a
     }
c30a5a
 
c30a5a
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
c30a5a
+  longjmp (png_jmpbuf(png_ptr), 1);
c30a5a
+#else
c30a5a
   longjmp (png_ptr->jmpbuf, 1);
c30a5a
+#endif
c30a5a
 }
c30a5a
 
c30a5a
 static void 
c30a5a
@@ -515,7 +523,11 @@ _our_error_fn_stream (png_struct *png_pt
c30a5a
 #endif
c30a5a
     }
c30a5a
 
c30a5a
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
c30a5a
+  longjmp (png_jmpbuf(png_ptr), 1);
c30a5a
+#else
c30a5a
   longjmp (png_ptr->jmpbuf, 1);
c30a5a
+#endif
c30a5a
 }
c30a5a
 
c30a5a
 static void