Util: Fix build on ancient versions of libpng

This commit is contained in:
Jeffrey Pfau 2015-09-03 03:06:27 -07:00
parent 4db6a13ea4
commit 664a46c5a9
1 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ bool PNGWritePixels(png_structp png, unsigned width, unsigned height, unsigned s
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 @@ bool PNGWriteCustomChunk(png_structp png, const char* name, size_t size, void* d
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 @@ bool PNGInstallChunkHandler(png_structp png, void* context, ChunkHandler handler
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;
}