$NetBSD: patch-ab,v 1.6 2011/01/29 11:32:19 wiz Exp $

Fix build with png-1.5.
Fed back upstream, will be included in 1.6.42.

--- src/fxpngio.cpp.orig	2006-01-22 17:58:54.000000000 +0000
+++ src/fxpngio.cpp
@@ -75,7 +75,11 @@ static void user_flush_fn(png_structp ){
 static void user_error_fn(png_structp png_ptr,png_const_charp){
   FXStream* store=(FXStream*)png_get_error_ptr(png_ptr);
   store->setError(FXStreamFormat);                      // Flag this as a format error in FXStream
+#if (PNG_LIBPNG_VER < 10500)
   longjmp(png_ptr->jmpbuf,1);                           // Bail out
+#else
+  png_longjmp(png_ptr,1);                               // Bail out
+#endif
   }
 
 
@@ -118,7 +122,7 @@ bool fxloadPNG(FXStream& store,FXColor*&
     }
 
   // Set error handling
-  if(setjmp(png_ptr->jmpbuf)){
+  if(setjmp(png_jmpbuf(png_ptr))){
 
     // Free all of the memory associated with the png_ptr and info_ptr
     png_destroy_read_struct(&png_ptr,&info_ptr,(png_infopp)NULL);
@@ -231,7 +235,7 @@ bool fxsavePNG(FXStream& store,const FXC
     }
 
   // Set error handling.
-  if(setjmp(png_ptr->jmpbuf)){
+  if(setjmp(png_jmpbuf(png_ptr))){
     png_destroy_write_struct(&png_ptr,&info_ptr);
     return false;
     }
