$OpenBSD: patch-src_fxpngio_cpp,v 1.1 2011/07/08 20:38:02 naddy Exp $

Fix build with png-1.5.

--- src/fxpngio.cpp.orig	Mon Jul  4 22:42:45 2011
+++ src/fxpngio.cpp	Mon Jul  4 22:49:30 2011
@@ -75,7 +75,7 @@ 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
-  longjmp(png_ptr->jmpbuf,1);                           // Bail out
+  png_longjmp(png_ptr,1);                           // Bail out
   }
 
 
@@ -118,7 +118,7 @@ bool fxloadPNG(FXStream& store,FXColor*& data,FXint& w
     }
 
   // 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 +231,7 @@ bool fxsavePNG(FXStream& store,const FXColor* data,FXi
     }
 
   // Set error handling.
-  if(setjmp(png_ptr->jmpbuf)){
+  if(setjmp(png_jmpbuf(png_ptr))){
     png_destroy_write_struct(&png_ptr,&info_ptr);
     return false;
     }
