summaryrefslogtreecommitdiff
path: root/sci-physics/lightspeed/files/lightspeed-1.2a-libpng15.patch
blob: db0d0faa1123dd90a5f672ee8b27b239bd44f110 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- a/src/snapshot.c
+++ b/src/snapshot.c
@@ -26,6 +26,7 @@
 #include "lightspeed.h"
 
 #ifdef HAVE_LIBPNG
+#include <zlib.h>
 #include <png.h>
 static int write_png( int message, const void *data );
 #endif
@@ -305,7 +306,7 @@
 			return -1;
 		png_write_s = png_create_write_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL );
 		png_info_s = png_create_info_struct( png_write_s );
-		if (setjmp( png_write_s->jmpbuf )) {
+		if (setjmp( png_jmpbuf( png_write_s ) )) {
 			/* Error writing file */
 			png_destroy_write_struct( &png_write_s, &png_info_s );
 			fclose( png_fp );