diff options
author | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2016-05-18 02:19:55 (EDT) |
---|---|---|
committer | Gianfranco Costamagna <costamagnagianfranco@yahoo.it> | 2016-05-18 02:21:52 (EDT) |
commit | eed1888ade8274b106b06a55af29ef9cd33c5917 (patch) | |
tree | 7b7b7c2b726172b32a08aabbf7520c0b0c6f1927 /xcf2png.c | |
parent | 196f51790bbaff594525935adeab1247bb798946 (diff) | |
download | xcftools-eed1888ade8274b106b06a55af29ef9cd33c5917.zip xcftools-eed1888ade8274b106b06a55af29ef9cd33c5917.tar.gz xcftools-eed1888ade8274b106b06a55af29ef9cd33c5917.tar.bz2 |
Fix libpng1.5 issue, keeping backword-compatible code, from Debian
Diffstat (limited to 'xcf2png.c')
-rw-r--r-- | xcf2png.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -59,7 +59,14 @@ my_error_callback(png_structp png_ptr, png_const_charp errormsg) FatalUnexpected(_("Libpng error '%s'"),errormsg); } - +#ifndef png_voidp_NULL +#define png_voidp_NULL NULL +#endif + +#ifndef png_error_ptr_NULL +#define png_error_ptr_NULL NULL +#endif + static void init_output(void) { @@ -71,9 +78,9 @@ init_output(void) outfile = openout(flatspec.output_filename); libpng = png_create_write_struct(PNG_LIBPNG_VER_STRING, - NULL, + png_voidp_NULL, my_error_callback, - NULL); + png_error_ptr_NULL); if( !libpng ) FatalUnexpected(_("Couldn't initialize libpng library")); |