File: libpng-fix

package info (click to toggle)
matchbox-keyboard 0.1%2Bsvn20080916-11
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,048 kB
  • ctags: 539
  • sloc: ansic: 3,950; xml: 1,778; makefile: 85; sh: 2
file content (18 lines) | stat: -rw-r--r-- 506 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;