summarylogtreecommitdiffstats
path: root/scanfile.patch
blob: b2add2f03c83a3ac96d977e15d823f65c54f439a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- scangearmp-source-1.60-1/scangearmp/src/scanfile.c	2010-02-17 02:22:35.000000000 +0000
+++ scangearmp-source-1.60-1.new/scangearmp/src/scanfile.c	2017-04-01 22:36:34.766555076 +0100
@@ -44,6 +44,7 @@
 #include "progress_bar.h"
 #include "raw2pdf.h"
 #include "scanmsg.h"
+#include "zlib.h"
 
 #define GRAY2MONO_BK		(0)
 #define GRAY2MONO_GRAY		(1)
@@ -386,7 +387,8 @@
 
 void write_data_for_png( png_structp png_ptr, png_bytep data, png_size_t length )
 {
-	FileControlWriteFile( *( (int *)png_ptr->io_ptr ), (CNMSLPSTR)data, length );
+	voidp write_io_ptr = png_get_io_ptr(png_ptr);
+	FileControlWriteFile( write_io_ptr, (CNMSLPSTR)data, length );
 
 	return;
 }