summaryrefslogtreecommitdiff
path: root/graphics/imlib/files/patch-load.c
blob: 4714064027100041a31c6e4e30380532fa25075c (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
--- Imlib/load.c.orig	2004-09-21 02:23:20.000000000 +0200
+++ Imlib/load.c	2010-03-28 16:23:13.000000000 +0200
@@ -170,6 +176,7 @@
 #endif /* HAVE_LIBJPEG */
 
 #ifdef HAVE_LIBPNG
+#include <pngpriv.h>
 unsigned char      *
 _LoadPNG(ImlibData * id, FILE * f, int *w, int *h, int *t)
 {
@@ -192,7 +198,7 @@
       png_destroy_read_struct(&png_ptr, NULL, NULL);
       return NULL;
     }
-  if (setjmp(png_ptr->jmpbuf))
+  if (setjmp(png_jmpbuf(png_ptr)))
     {
       png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
       return NULL;
@@ -1619,7 +1619,7 @@
     return 0;
   fread(buf, 1, 8, f);
   rewind(f);
-  return (int)png_check_sig(buf, 8);
+  return (int)!png_sig_cmp(buf, 0, 8);
 #else
   return 0;
 #endif