matchbox-keyboard (0.1+svn20080916-9) libpng-fix

Summary

 src/matchbox-keyboard-image.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

Description: Fix build with libpng 1.5 (#649820)
Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Last-Update: 2012-03-16
--- a/src/matchbox-keyboard-image.c
+++ b/src/matchbox-keyboard-image.c
@@ -64,8 +64,11 @@
     fclose(fd);
     return NULL;
   }
-
+#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
+  if ( setjmp( png_jmpbuf ( png_ptr ) ) ) {
+#else
   if ( setjmp( png_ptr->jmpbuf ) ) {
+#endif
     png_destroy_read_struct( &png_ptr, &info_ptr, NULL);
     fclose(fd);
     return NULL;