--- xwin.c.orig 2011-07-26 00:03:37.000000000 +0200 +++ xwin.c 2013-01-24 23:59:09.000000000 +0100 @@ -277,7 +277,11 @@ fclose(f); return 1; } +#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 + if (setjmp(png_jmpbuf(pp))) { +#else if (setjmp(pp->jmpbuf)) { +#endif png_destroy_write_struct(&pp,&ip); fclose(f); gdk_image_destroy(image);