File xfig.3.2.5b-libpng14.dif of Package xfig

--- f_readpng.c
+++ f_readpng.c	2010-04-20 15:45:02.627072958 +0000
@@ -136,7 +136,11 @@ read_png(FILE *file, int filetype, F_pic
 
 	if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) {
 	    png_get_hIST(png_ptr, info_ptr, &histogram);
+#if (PNG_LIBPNG_VER_MAJOR > 1 || (PNG_LIBPNG_VER_MAJOR == 1 && (PNG_LIBPNG_VER_MINOR > 4))) || defined(png_set_quantize)
+	    png_set_quantize(png_ptr, palette, num_palette, 256, histogram, 0);
+#else
 	    png_set_dither(png_ptr, palette, num_palette, 256, histogram, 0);
+#endif
 	}
     }
     if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {