diff -aur old/jbig2_image_png.c new/jbig2_image_png.c
--- old/jbig2_image_png.c	2014-10-31 03:30:04.000000000 -1000
+++ new/jbig2_image_png.c	2015-04-08 12:15:31.535949306 -1000
@@ -25,8 +25,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <png.h>
-#include <pngstruct.h>
+#include <libpng16/png.h>
 #define CVT_PTR(ptr) (ptr)
 
 #include "jbig2.h"
@@ -40,7 +39,7 @@
 {
     png_size_t check;
 
-    check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr);
+    check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr));
     if (check != length) {
       png_error(png_ptr, "Write Error");
     }
@@ -50,7 +49,7 @@
 jbig2_png_flush(png_structp png_ptr)
 {
     png_FILE_p io_ptr;
-    io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
+    io_ptr = (png_FILE_p)png_get_io_ptr(png_ptr);
     if (io_ptr != NULL)
         fflush(io_ptr);
 }
