summaryrefslogtreecommitdiff
path: root/x11/fltk2/patches/patch-ag
blob: 2825da88f957031c701e784e944bd89cf0b7b7bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$NetBSD: patch-ag,v 1.3 2013/02/17 15:03:01 prlw1 Exp $

Fix build with png-1.5 (setjmp)
http://www.fltk.org/str.php?L2363+P0+S-2+C0+I0+E0+Q
Fix build with png-1.6 (string.h)

--- images/fl_png.cxx.orig	2007-04-16 14:48:06.000000000 +0000
+++ images/fl_png.cxx
@@ -38,7 +38,8 @@ extern "C"
 #endif
 }
 
-# include <stdlib.h>
+#include <stdlib.h>
+#include <string.h>
 
 static png_bytep cur_datas;
 
@@ -111,7 +112,7 @@ bool pngImage::fetch()
     png_set_sig_bytes(png_ptr, 8);
   }
 
-  if (setjmp(png_ptr->jmpbuf))
+  if (setjmp(png_jmpbuf(png_ptr)))
     goto error;
 
   png_read_info(png_ptr, info_ptr);