File sfml-1.6-png.patch of Package sfml

diff -Naur sfml-1.6.orig/src/SFML/Graphics/ImageLoader.cpp sfml-1.6/src/SFML/Graphics/ImageLoader.cpp
--- sfml-1.6.orig/src/SFML/Graphics/ImageLoader.cpp	2010-07-12 17:36:47.000000000 +0200
+++ sfml-1.6/src/SFML/Graphics/ImageLoader.cpp	2012-12-19 15:00:39.759644515 +0100
@@ -44,7 +44,11 @@
     void PngErrorHandler(png_structp Png, png_const_charp Message)
     {
         std::cerr << "Failed to write PNG image. Reason : " << Message << std::endl;
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+        longjmp(png_jmpbuf(Png), 1);
+#else
         longjmp(Png->jmpbuf, 1);
+#endif
     }
 }
 
@@ -289,7 +293,11 @@
     }
 
     // For proper error handling...
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+    if (setjmp(png_jmpbuf(Png)))
+#else
     if (setjmp(Png->jmpbuf))
+#endif
     {
         png_destroy_write_struct(&Png, &PngInfo);
         return false;