openbsd-ports/x11/irrlicht/patches/patch-source_Irrlicht_CImageWriterPNG_cpp
naddy eed7c62887 Fix build with png-1.5.
All fixes by yours truly.
2011-07-08 20:38:00 +00:00

22 lines
819 B
Plaintext

$OpenBSD: patch-source_Irrlicht_CImageWriterPNG_cpp,v 1.1 2011/07/08 20:38:02 naddy Exp $
--- source/Irrlicht/CImageWriterPNG.cpp.orig Mon Jul 4 19:06:36 2011
+++ source/Irrlicht/CImageWriterPNG.cpp Mon Jul 4 19:17:48 2011
@@ -35,7 +35,7 @@ IImageWriter* createImageWriterPNG()
static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
{
os::Printer::log("PNG FATAL ERROR", msg, ELL_ERROR);
- longjmp(png_ptr->jmpbuf, 1);
+ png_longjmp(png_ptr, 1);
}
// PNG function for file writing
@@ -43,7 +43,7 @@ void PNGAPI user_write_data_fcn(png_structp png_ptr, p
{
png_size_t check;
- io::IWriteFile* file=(io::IWriteFile*)png_ptr->io_ptr;
+ io::IWriteFile* file=(io::IWriteFile*)png_get_io_ptr(png_ptr);
check=(png_size_t) file->write((const void*)data,(u32)length);
if (check != length)