summaryrefslogtreecommitdiff
path: root/editors/emacs21/patches/patch-ax
blob: 7a8c72a7fe6c8a0a2cb90523143cf3681a4e24c5 (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
$NetBSD: patch-ax,v 1.1 2011/01/24 09:42:40 wiz Exp $

Fix build with png-1.5.

--- src/xfns.c.orig	2002-12-06 17:05:35.000000000 +0000
+++ src/xfns.c
@@ -8541,7 +8541,11 @@ my_png_error (png_ptr, msg)
 {
   xassert (png_ptr != NULL);
   image_error ("PNG error: %s", build_string (msg), Qnil);
+#if (PNG_LIBPNG_VER < 10500)
   longjmp (png_ptr->jmpbuf, 1);
+#else
+  png_longjmp (png_ptr, 1);
+#endif
 }
 
 
@@ -8699,7 +8703,7 @@ png_load (f, img)
 
   /* Set error jump-back.  We come back here when the PNG library
      detects an error.  */
-  if (setjmp (png_ptr->jmpbuf))
+  if (setjmp (png_jmpbuf(png_ptr)))
     {
     error:
       if (png_ptr)