| 1 |
Description: Fix libpng 1.5 build |
| 2 |
libpng-1.5 hides structure members from public view, this patch |
| 3 |
adapts plotutils for this. |
| 4 |
. |
| 5 |
While Debian does not yet fix libpng 1.5 this will avoid future |
| 6 |
FTBFS. |
| 7 |
Origin: https://lists.gnu.org/archive/html/bug-plotutils/2011-01/msg00000.html |
| 8 |
Forwarded: See origin. |
| 9 |
Author: Thomal Klausner <[email protected]> |
| 10 |
|
| 11 |
--- a/libplot/z_write.c |
| 12 |
+++ b/libplot/z_write.c |
| 13 |
@@ -164,7 +164,7 @@ |
| 14 |
} |
| 15 |
|
| 16 |
/* cleanup after libpng errors (error handler does a longjmp) */ |
| 17 |
- if (setjmp (png_ptr->jmpbuf)) |
| 18 |
+ if (setjmp (png_jmpbuf (png_ptr))) |
| 19 |
{ |
| 20 |
png_destroy_write_struct (&png_ptr, (png_info **)NULL); |
| 21 |
return -1; |
| 22 |
@@ -444,7 +444,11 @@ |
| 23 |
#endif |
| 24 |
} |
| 25 |
|
| 26 |
+#if (PNG_LIBPNG_VER < 10500) |
| 27 |
longjmp (png_ptr->jmpbuf, 1); |
| 28 |
+#else |
| 29 |
+ png_longjmp (png_ptr, 1); |
| 30 |
+#endif |
| 31 |
} |
| 32 |
|
| 33 |
static void |
| 34 |
@@ -515,7 +519,11 @@ |
| 35 |
#endif |
| 36 |
} |
| 37 |
|
| 38 |
+#if (PNG_LIBPNG_VER < 10500) |
| 39 |
longjmp (png_ptr->jmpbuf, 1); |
| 40 |
+#else |
| 41 |
+ png_longjmp (png_ptr, 1); |
| 42 |
+#endif |
| 43 |
} |
| 44 |
|
| 45 |
static void |