summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-games/crystalspace/files/crystalspace-1.4.0-png15.patch')
-rw-r--r--dev-games/crystalspace/files/crystalspace-1.4.0-png15.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/dev-games/crystalspace/files/crystalspace-1.4.0-png15.patch b/dev-games/crystalspace/files/crystalspace-1.4.0-png15.patch
new file mode 100644
index 000000000000..314521eaf235
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-1.4.0-png15.patch
@@ -0,0 +1,56 @@
+--- plugins/video/loader/png/pngimage.cpp.old 2011-09-09 10:39:57.218570796 +0200
++++ plugins/video/loader/png/pngimage.cpp 2011-09-09 10:46:45.733522309 +0200
+@@ -60,7 +60,7 @@
+
+ static void png_write (png_structp png, png_bytep data, png_size_t length)
+ {
+- datastore *ds = (datastore *)png->io_ptr;
++ datastore *ds = (datastore *)png_get_io_ptr(png);
+ if (ds->pos + (long)length > ds->length)
+ {
+ ds->data = (unsigned char*)cs_realloc (ds->data, ds->pos + (long)length);
+@@ -173,7 +173,7 @@
+ }
+
+ /* Catch processing errors */
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf(png)))
+ {
+ /* If we get here, we had a problem reading the file */
+ png_destroy_write_struct (&png, &info);
+@@ -355,7 +355,7 @@
+ void ImagePngFile::PngLoader::ImagePngRead (png_structp png, png_bytep data,
+ png_size_t size)
+ {
+- ImagePngRawData *self = (ImagePngRawData *) png->io_ptr;
++ ImagePngRawData *self = (ImagePngRawData *) png_get_io_ptr(png);
+
+ if (self->r_size < size)
+ png_error (png, "Read Error");
+@@ -394,7 +394,7 @@
+ return false;
+ }
+
+- if (setjmp (png->jmpbuf))
++ if (setjmp (png_jmpbuf(png)))
+ {
+ nomem2:
+ // If we get here, we had a problem reading the file
+@@ -524,7 +524,7 @@
+ {
+ size_t rowbytes, exp_rowbytes;
+
+- if (setjmp (png->jmpbuf))
++ if (setjmp (png_jmpbuf(png)))
+ {
+ nomem2:
+ // If we get here, we had a problem reading the file
+@@ -560,7 +560,7 @@
+
+ png_bytep * const row_pointers = new png_bytep[Height];
+
+- if (setjmp (png->jmpbuf)) // Set a new exception handler
++ if (setjmp (png_jmpbuf(png))) // Set a new exception handler
+ {
+ delete [] row_pointers;
+ goto nomem2;