Util: Fix build on ancient versions of libpng
Jeffrey Pfau jeffrey@endrift.com
Thu, 03 Sep 2015 03:06:27 -0700
1 files changed,
3 insertions(+),
3 deletions(-)
jump to
M
src/util/png-io.c
→
src/util/png-io.c
@@ -53,7 +53,7 @@ png_bytep row = malloc(sizeof(png_bytep) * width * 3);
if (!row) { return false; } - png_const_bytep pixelData = pixels; + const png_byte* pixelData = pixels; if (setjmp(png_jmpbuf(png))) { free(row); return false;@@ -81,7 +81,7 @@ realName[4] = '\0';
if (setjmp(png_jmpbuf(png))) { return false; } - png_write_chunk(png, (png_const_bytep) realName, data, size); + png_write_chunk(png, (png_bytep) realName, data, size); return true; }@@ -117,7 +117,7 @@ if (setjmp(png_jmpbuf(png))) {
return false; } png_set_read_user_chunk_fn(png, context, handler); - png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS, (png_const_bytep) chunkName, 1); + png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS, (png_bytep) chunkName, 1); return true; }