$NetBSD: patch-aa,v 1.15 2011/02/06 23:59:37 wiz Exp $ Fix build with png-1.5. --- filters/krita/png/kis_png_converter.cc.orig 2007-05-30 21:39:37.000000000 +0000 +++ filters/krita/png/kis_png_converter.cc @@ -221,7 +221,8 @@ KisImageBuilder_Result KisPNGConverter:: bool hasalpha = (color_type == PNG_COLOR_TYPE_RGB_ALPHA || color_type == PNG_COLOR_TYPE_GRAY_ALPHA); // Read image profile - png_charp profile_name, profile_data; + png_charp profile_name; + png_bytep profile_data; int compression_type; png_uint_32 proflen; int number_of_passes = 1; @@ -627,7 +628,7 @@ KisImageBuilder_Result KisPNGConverter:: } else { // Profile char* name = new char[(*it)->type().length()+1]; strcpy(name, (*it)->type().ascii()); - png_set_iCCP(png_ptr, info_ptr, name, PNG_COMPRESSION_TYPE_BASE, (char*)(*it)->annotation().data(), (*it) -> annotation() . size()); + png_set_iCCP(png_ptr, info_ptr, name, PNG_COMPRESSION_TYPE_BASE, (png_bytep)(*it)->annotation().data(), (*it) -> annotation() . size()); } ++it; } @@ -785,7 +786,7 @@ void KisPNGConverter::cancel() void KisPNGConverter::progress(png_structp png_ptr, png_uint_32 row_number, int pass) { - if(png_ptr == NULL || row_number > PNG_MAX_UINT || pass > 7) return; + if(png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7) return; // setProgress(row_number); }