Blob Blame History Raw
diff -Nur gdal-1.7.3-fedora/frmts/png/pngdataset.cpp gdal-1.7.3-fedora-png15/frmts/png/pngdataset.cpp
--- gdal-1.7.3-fedora/frmts/png/pngdataset.cpp	2010-11-07 23:58:47.000000000 +0530
+++ gdal-1.7.3-fedora-png15/frmts/png/pngdataset.cpp	2012-01-10 14:50:25.384124887 +0530
@@ -1296,7 +1296,7 @@
     * instead of an int, which is what fread() actually returns.
     */
    check = (png_size_t)VSIFReadL(data, (png_size_t)1, length,
-                                 (png_FILE_p)png_ptr->io_ptr);
+                                 (png_FILE_p)png_get_io_ptr(png_ptr));
 
    if (check != length)
       png_error(png_ptr, "Read Error");
@@ -1311,7 +1311,7 @@
 {
    png_uint_32 check;
 
-   check = VSIFWriteL(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
+   check = VSIFWriteL(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr));
 
    if (check != length)
       png_error(png_ptr, "Write Error");
@@ -1322,7 +1322,7 @@
 /************************************************************************/
 static void png_vsi_flush(png_structp png_ptr)
 {
-    VSIFFlushL( (png_FILE_p)(png_ptr->io_ptr) );
+    VSIFFlushL( (png_FILE_p)png_get_io_ptr(png_ptr) );
 }
 
 /************************************************************************/
@@ -1338,7 +1338,7 @@
     // libpng is generally not built as C++ and so won't honour unwind
     // semantics.  Ugg. 
 
-    jmp_buf* psSetJmpContext = (jmp_buf*) png_ptr->error_ptr;
+    jmp_buf* psSetJmpContext = (jmp_buf*) png_get_error_ptr(png_ptr);
     if (psSetJmpContext)
     {
         longjmp( *psSetJmpContext, 1 );