aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/xfig/files/patch-f_wrpng.c
blob: 7e516553fd680cbb72745c236f82928b0b7eed05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- f_wrpng.c.orig
+++ f_wrpng.c
@@ -20,6 +20,7 @@
 #include "w_msgpanel.h"
 #include "w_setup.h"
 #include <png.h>
+#include <zlib.h>
 
 /*
  * Write PNG file from rgb data
@@ -59,7 +60,7 @@ write_png(FILE *file, unsigned char *dat
     }
 
     /* set long jump recovery here */
-    if (setjmp(png_ptr->jmpbuf)) {
+    if (setjmp(png_jmpbuf(png_ptr))) {
    /* if we get here there was a problem reading the file */
    png_destroy_write_struct(&png_ptr, &info_ptr);
    return False;