openbsd-ports/games/prboom/patches/patch-src_m_misc_c
naddy eed7c62887 Fix build with png-1.5.
All fixes by yours truly.
2011-07-08 20:38:00 +00:00

25 lines
898 B
Plaintext

$OpenBSD: patch-src_m_misc_c,v 1.1 2011/07/08 20:38:01 naddy Exp $
Fix build with png-1.5.
--- src/m_misc.c.orig Wed Jul 6 12:26:31 2011
+++ src/m_misc.c Wed Jul 6 12:26:57 2011
@@ -1041,7 +1041,7 @@ static void WritePNGfile(FILE* fp, const byte* data,
png_infop info_ptr;
boolean gl = !palette;
- png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, png_error_ptr_NULL, error_fn, NULL);
+ png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, error_fn, NULL);
png_set_compression_level(png_ptr, 2);
if (png_ptr == NULL) { screenshot_write_error = true; return; }
info_ptr = png_create_info_struct(png_ptr);
@@ -1067,7 +1067,7 @@ static void WritePNGfile(FILE* fp, const byte* data,
png_write_end(png_ptr, info_ptr);
}
- png_destroy_write_struct(&png_ptr, png_infopp_NULL);
+ png_destroy_write_struct(&png_ptr, NULL);
}
#else /* HAVE_LIBPNG */