[raidem] Use accessors to png structs

Bruno Wolff III bruno at fedoraproject.org
Sun Nov 6 15:39:51 UTC 2011


commit 59cad3269dfad797169ecd9ac1bad7244a2354b0
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sun Nov 6 09:32:36 2011 -0600

    Use accessors to png structs
    
    Direct access to elements of png structures is no longer allowed in 1.5.

 raidem-libpng15.patch |   22 ++++++++++++++++++++--
 raidem.spec           |    3 ++-
 2 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/raidem-libpng15.patch b/raidem-libpng15.patch
index 90677a4..9de67a2 100644
--- a/raidem-libpng15.patch
+++ b/raidem-libpng15.patch
@@ -1,5 +1,5 @@
---- lib/loadpng/loadpng.c.orig	2011-11-06 09:00:39.113061546 -0600
-+++ lib/loadpng/loadpng.c	2011-11-06 09:01:08.770830874 -0600
+--- lib/loadpng/loadpng.c.libpng	2006-04-07 00:17:29.000000000 -0500
++++ lib/loadpng/loadpng.c	2011-11-06 09:30:59.754455681 -0600
 @@ -14,6 +14,7 @@
   */
  
@@ -8,3 +8,21 @@
  #include <png.h>
  #include <allegro.h>
  #include <allegro/internal/aintern.h>
+@@ -314,7 +315,7 @@
+      * the normal method of doing things with libpng).  REQUIRED unless you
+      * set up your own error handlers in the png_create_read_struct() earlier.
+      */
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+ 	/* Free all of the memory associated with the png_ptr and info_ptr */
+ 	png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ 	/* If we get here, we had a problem reading the file */
+@@ -417,7 +418,7 @@
+      * the normal method of doing things with libpng).  REQUIRED unless you
+      * set up your own error handlers in the png_create_read_struct() earlier.
+      */
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+ 	/* Free all of the memory associated with the png_ptr and info_ptr */
+ 	png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ 	/* If we get here, we had a problem reading the file */
diff --git a/raidem.spec b/raidem.spec
index 024c9e0..fa903c6 100644
--- a/raidem.spec
+++ b/raidem.spec
@@ -88,7 +88,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 %changelog
 * Sun Nov 06 2011 Bruno Wolff III <bruno at wolff.to> - 0.3.1-17
-- Include zlib.h since png.h no longer does for libpng 1.5
+- Include zlib.h since png.h no longer does for libpng 1.5.
+- Use accessors instead of direct access to png structs.
 
 * Sat Jul 16 2011 Hans de Goede <hdegoede at redhat.com> - 0.3.1-16
 - Fix zziplib zzip_freopen abuse (fixes crash on startup, rhbz#710190)


More information about the scm-commits mailing list