summaryrefslogtreecommitdiffstats
path: root/redhat/applications/digikam/digikam-3.5.13-fix_libpng_support.patch
blob: 5ca2353ef7278d95c58ce75af2da17103f7eb72d (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--- digikam/digikam/libs/dimg/loaders/pngloader.cpp.ORI	2012-05-01 14:49:41.357985513 +0200
+++ digikam/digikam/libs/dimg/loaders/pngloader.cpp	2012-05-01 14:53:47.459349483 +0200
@@ -120,7 +120,11 @@
     // PNG error handling. If an error occurs during reading, libpng
     // will jump here
 
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+    if (setjmp(png_jmpbuf(png_ptr)))
+#else
     if (setjmp(png_ptr->jmpbuf))
+#endif
     {
         DDebug() << k_funcinfo << "Internal libPNG error during reading file. Process aborted!" << endl;
         png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
@@ -526,7 +531,11 @@
     // PNG error handling. If an error occurs during writing, libpng
     // will jump here
 
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+    if (setjmp(png_jmpbuf(png_ptr)))
+#else
     if (setjmp(png_ptr->jmpbuf))
+#endif
     {
         DDebug() << k_funcinfo << "Internal libPNG error during writing file. Process aborted!" << endl;
         fclose(f);
--- digikam/digikam/kioslave/digikamthumbnail.cpp.ORI	2012-05-01 15:44:40.237089691 +0200
+++ digikam/digikam/kioslave/digikamthumbnail.cpp	2012-05-01 15:45:22.939534916 +0200
@@ -392,7 +392,11 @@
         return qimage;
     }
 
+#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(f);