summaryrefslogtreecommitdiff
blob: f849549bae13cef8e70af2d915c2633ced97c1a9 (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
29
30
31
32
33
34
diff -ur pngtools-0.4.orig/Makefile.am pngtools-0.4/Makefile.am
--- pngtools-0.4.orig/Makefile.am	2008-11-27 01:14:17.000000000 +0200
+++ pngtools-0.4/Makefile.am	2010-03-09 00:51:10.000000000 +0200
@@ -4,3 +4,6 @@
 pngcp_SOURCES = pngcp.c pngread.c pngwrite.c inflateraster.c
 pngchunkdesc_SOURCES = pngchunkdesc.c
 pngchunks_SOURCES = pngchunks.c
+
+pnginfo_LDADD = -lpng
+pngcp_LDADD = -lpng
diff -ur pngtools-0.4.orig/pnginfo.c pngtools-0.4/pnginfo.c
--- pngtools-0.4.orig/pnginfo.c	2008-11-27 01:14:17.000000000 +0200
+++ pngtools-0.4/pnginfo.c	2010-03-09 00:42:58.000000000 +0200
@@ -152,7 +152,7 @@
 
   // Check that it really is a PNG file
   fread (sig, 1, 8, image);
-  if (!png_check_sig (sig, 8))
+  if (!png_sig_cmp(sig, 0, 8) == 0)
     {
       printf ("  This file is not a valid PNG file\n");
       fclose (image);
diff -ur pngtools-0.4.orig/pngread.c pngtools-0.4/pngread.c
--- pngtools-0.4.orig/pngread.c	2008-11-27 01:14:17.000000000 +0200
+++ pngtools-0.4/pngread.c	2010-03-09 00:43:27.000000000 +0200
@@ -26,7 +26,7 @@
 
   // Check that it really is a PNG file
   fread(sig, 1, 8, image);
-  if(!png_check_sig(sig, 8)){
+  if(!png_sig_cmp(sig, 0, 8) == 0){
     fprintf(stderr, "This file is not a valid PNG file\n");
     goto error;
   }