This patch file may include trailing empty lines and/or trailing lines that consist solely of whitespace. If you edit this file, use software that preserves lines of this type, or you may break the patch. --- SILLY-0.1.0.old/src/loaders/SILLYPNGImageLoader.cpp +++ SILLY-0.1.0/src/loaders/SILLYPNGImageLoader.cpp @@ -30,6 +30,7 @@ #ifdef HAVE_CONFIG_H #include #endif +#include #include "loaders/SILLYPNGImageLoader.h" @@ -66,7 +67,11 @@ // printf("PNG Error: %s\n", error); // copied from libpng's pngerror.cpp jmp_buf buf; +#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 + memcpy(buf, png_jmpbuf((png_ptr)), sizeof(jmp_buf)); +#else memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf)); +#endif longjmp(buf, 1); }