summaryrefslogtreecommitdiff
path: root/community/desmume/desmume-0.9.7-zlib.1.2.6-fix.patch
blob: 8cac7cb67cef5a1bbb60fab25230476e000e9b10 (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
35
36
37
38
39
40
--- a/src/ROMReader.cpp	2012/02/09 21:33:57	4177
+++ b/src/ROMReader.cpp	2012/02/10 19:58:06	4178
@@ -140,7 +140,7 @@
 
 void GZIPROMReaderDeInit(void * file)
 {
-	gzclose(file);
+	gzclose((gzFile)file);
 }
 
 u32 GZIPROMReaderSize(void * file)
@@ -150,22 +150,22 @@
 
 	/* FIXME this function should first save the current
 	 * position and restore it after size calculation */
-	gzrewind(file);
-	while (gzeof (file) == 0)
-		size += gzread(file, useless, 1024);
-	gzrewind(file);
+	gzrewind((gzFile)file);
+	while (gzeof ((gzFile)file) == 0)
+		size += gzread((gzFile)file, useless, 1024);
+	gzrewind((gzFile)file);
 
 	return size;
 }
 
 int GZIPROMReaderSeek(void * file, int offset, int whence)
 {
-	return gzseek(file, offset, whence);
+	return gzseek((gzFile)file, offset, whence);
 }
 
 int GZIPROMReaderRead(void * file, void * buffer, u32 size)
 {
-	return gzread(file, buffer, size);
+	return gzread((gzFile)file, buffer, size);
 }
 #endif