3d68573b5fa8b4a79ebfea9626ff5aa70e2bb334
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / matchbox / matchbox-lib / 0002-libpng15.patch
1 Support for libpng 1.5+ shamelessly taken from Gentoo.
2
3 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
4
5 --- a/libmb/mbpixbuf.c
6 +++ b/libmb/mbpixbuf.c
7 @@ -247,7 +247,7 @@
8      return NULL;
9    }
10  
11 -  if ( setjmp( png_ptr->jmpbuf ) ) {
12 +  if ( setjmp( png_jmpbuf(png_ptr) ) ) {
13      png_destroy_read_struct( &png_ptr, &info_ptr, NULL);
14      fclose(fd);
15      return NULL;
16 @@ -269,8 +269,8 @@
17        ( color_type == PNG_COLOR_TYPE_GRAY_ALPHA ))
18      png_set_gray_to_rgb(png_ptr);
19   
20 -  if ( info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA 
21 -       || info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA
22 +  if ( color_type == PNG_COLOR_TYPE_RGB_ALPHA 
23 +       || color_type == PNG_COLOR_TYPE_GRAY_ALPHA
24         )
25      *has_alpha = 1;
26    else