File: ftbfs-with-libpng15.patch

package info (click to toggle)
blockout2 2.5%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 5,236 kB
  • sloc: cpp: 10,786; ansic: 148; makefile: 127
file content (34 lines) | stat: -rw-r--r-- 871 bytes parent folder | download | duplicates (2)
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
--- a/ImageLib/src/png/hpng.c
+++ b/ImageLib/src/png/hpng.c
@@ -1,7 +1,7 @@
 #include <malloc.h>
 #include <math.h>
 #include <string.h>
-#include <libpng12/png.h>
+#include <libpng/png.h>
 #include "hpng.h"
 
 char PngErrorMessage[1024];
@@ -46,8 +46,12 @@
 	// ---------------- Error handling
 
 	png_set_error_fn(png,NULL,my_png_error,NULL);
+#if (PNG_LIBPNG_VER < 10500)
   if (setjmp(png->jmpbuf)) {
- 	  png_destroy_read_struct(&png, &info, &endinfo);
+#else
+  if ( setjmp(png_jmpbuf(png)) ) {
+#endif
+	  png_destroy_read_struct(&png, &info, &endinfo);
 	  return 0;
 	}
 
@@ -155,7 +159,7 @@
    {
     	sprintf(PngErrorMessage,"png_create_info_struct() failed");
       fclose(fp);
-      png_destroy_write_struct(&png_ptr,  png_infopp_NULL);
+      png_destroy_write_struct(&png_ptr,  NULL);
       return PngErrorMessage;
    }