File: libpng16.patch

package info (click to toggle)
openlayer 2.1-2.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 3,392 kB
  • ctags: 2,317
  • sloc: ansic: 10,433; cpp: 9,890; xml: 109; makefile: 90; sh: 36
file content (40 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download
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
--- a/src/loadpng.c
+++ b/src/loadpng.c
@@ -4,7 +4,7 @@
  * This file is hereby placed in the public domain.
  */
 
-
+#include <zlib.h>
 #include <png.h>
 #include <allegro.h>
 #include <allegro/internal/aintern.h>
@@ -258,7 +258,7 @@
      * the normal method of doing things with libpng).  REQUIRED unless you
      * set up your own error handlers in the png_create_read_struct() earlier.
      */
-    if (setjmp(png_ptr->jmpbuf)) {
+    if (setjmp(png_jmpbuf(png_ptr))) {
 	/* Free all of the memory associated with the png_ptr and info_ptr */
 	png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
 	pack_fclose(fp);
@@ -357,7 +357,7 @@
      * the normal method of doing things with libpng).  REQUIRED unless you
      * set up your own error handlers in the png_create_read_struct() earlier.
      */
-    if (setjmp(png_ptr->jmpbuf)) {
+    if (setjmp(png_jmpbuf(png_ptr))) {
 	/* Free all of the memory associated with the png_ptr and info_ptr */
 	png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
 	/* If we get here, we had a problem reading the file */
--- a/src/savepng.c
+++ b/src/savepng.c
@@ -188,7 +188,7 @@
 	goto Error;
 
     /* Set error handling. */
-    if (setjmp(png_ptr->jmpbuf)) {
+    if (setjmp(png_jmpbuf(png_ptr))) {
 	/* If we get here, we had a problem reading the file. */
 	goto Error;
     }