From fffe12a95ef4b9b1d265e30772d28423c294dba6 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 10 2020 03:16:17 +0000 Subject: Apply patch plotutils-2.6-png15.patch patch_name: plotutils-2.6-png15.patch present_in_specfile: true --- diff --git a/libplot/z_write.c b/libplot/z_write.c index d76a7cc..6479ded 100644 --- a/libplot/z_write.c +++ b/libplot/z_write.c @@ -164,7 +164,11 @@ _pl_z_maybe_output_image (S___(Plotter *_plotter)) } /* cleanup after libpng errors (error handler does a longjmp) */ +#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, (png_info **)NULL); return -1; @@ -444,7 +448,11 @@ _our_error_fn_stdio (png_struct *png_ptr, const char *data) #endif } +#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 + longjmp (png_jmpbuf(png_ptr), 1); +#else longjmp (png_ptr->jmpbuf, 1); +#endif } static void @@ -515,7 +523,11 @@ _our_error_fn_stream (png_struct *png_ptr, const char *data) #endif } +#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 + longjmp (png_jmpbuf(png_ptr), 1); +#else longjmp (png_ptr->jmpbuf, 1); +#endif } static void