summaryrefslogtreecommitdiff
blob: 1e27bb385c68084fdbbaed757c8610230fec18f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- a/src/rstdrv.c
+++ b/src/rstdrv.c
@@ -53,6 +53,7 @@
 #endif
 
 #ifdef HAVE_LIBPNG
+#  include <zlib.h>
 #  include <png.h>
 #endif
 
@@ -885,7 +886,7 @@
         return;
     }
 
-    if (setjmp(png_ptr->jmpbuf)) {
+    if (setjmp(png_jmpbuf(png_ptr))) {
         png_destroy_write_struct(&png_ptr, &info_ptr);
         return;
     }