From: José Fonseca Date: Sat, 21 May 2011 09:03:51 +0000 (+0100) Subject: PNG portability fixes. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=b1f5ff67936c369bd25a65d996d47c1606d7f87d;p=apitrace PNG portability fixes. --- diff --git a/image.cpp b/image.cpp index 1f96c29..922c4d4 100644 --- a/image.cpp +++ b/image.cpp @@ -24,6 +24,7 @@ **************************************************************************/ +#include #include #include @@ -319,7 +320,7 @@ struct png_tmp_buffer static void pngWriteCallback(png_structp png_ptr, png_bytep data, png_size_t length) { - struct png_tmp_buffer *buf = (struct png_tmp_buffer*) png_ptr->io_ptr; + struct png_tmp_buffer *buf = (struct png_tmp_buffer*) png_get_io_ptr(png_ptr); size_t nsize = buf->size + length; /* allocate or grow buffer */