summaryrefslogtreecommitdiffstats
path: root/package/matchbox/matchbox-lib/matchbox-lib-1.9-libpng15.patch
blob: 3d68573b5fa8b4a79ebfea9626ff5aa70e2bb334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Support for libpng 1.5+ shamelessly taken from Gentoo.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

--- a/libmb/mbpixbuf.c
+++ b/libmb/mbpixbuf.c
@@ -247,7 +247,7 @@
     return NULL;
   }
 
-  if ( setjmp( png_ptr->jmpbuf ) ) {
+  if ( setjmp( png_jmpbuf(png_ptr) ) ) {
     png_destroy_read_struct( &png_ptr, &info_ptr, NULL);
     fclose(fd);
     return NULL;
@@ -269,8 +269,8 @@
       ( color_type == PNG_COLOR_TYPE_GRAY_ALPHA ))
     png_set_gray_to_rgb(png_ptr);
  
-  if ( info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA 
-       || info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA
+  if ( color_type == PNG_COLOR_TYPE_RGB_ALPHA 
+       || color_type == PNG_COLOR_TYPE_GRAY_ALPHA
        )
     *has_alpha = 1;
   else