[gimp/gimp-2-8] plug-ins: Fix build with libpng versions < 1.4.



commit 694e3313c8044cfd514fd6a4685351edd3f1aaf4
Author: Michael Henning <drawoc darkrefraction com>
Date:   Sun Feb 16 10:41:12 2014 -0500

    plug-ins: Fix build with libpng versions < 1.4.
    
    This was broken in 640f11f9c1d4cf45b81fdadc9555d891baab897b
    
    (cherry picked from commit d296a2c08a00f643177c7bacc0166d60417f579a)

 plug-ins/common/file-png.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index e3df90b..f123b1a 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -745,8 +745,10 @@ load_image (const gchar  *filename,
       return image;
     }
 
+#ifdef PNG_BENIGN_ERRORS_SUPPORTED
   /* Change some libpng errors to warnings (e.g. bug 721135) */
   png_set_benign_errors (pp, TRUE);
+#endif
 
   /*
    * Open the file and initialize the PNG read "engine"...
@@ -1351,8 +1353,10 @@ save_image (const gchar  *filename,
       return FALSE;
     }
 
+#ifdef PNG_BENIGN_ERRORS_SUPPORTED
   /* Change some libpng errors to warnings (e.g. bug 721135) */
   png_set_benign_errors (pp, TRUE);
+#endif
 
   /*
    * Open the file and initialize the PNG write "engine"...


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]