Deal with zlib fallout.
This commit is contained in:
parent
fe75e2af2c
commit
b9e9a58092
2 changed files with 35 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.9 2015/11/03 20:30:57 agc Exp $
|
||||
$NetBSD: distinfo,v 1.10 2017/02/14 21:29:39 joerg Exp $
|
||||
|
||||
SHA1 (fceu-0.98.13.src.tar.bz2) = fed37a9858aa8b149472f964b2ca652168e9f29a
|
||||
RMD160 (fceu-0.98.13.src.tar.bz2) = fc736006ed1e9aa564de817622ed575f246bad48
|
||||
|
@ -8,3 +8,4 @@ SHA1 (patch-aa) = 31ce24167b8f76df2961ce902d42f45b5278e451
|
|||
SHA1 (patch-ac) = 8a5297b11484c6eaf5d70a391bb486ff58475f35
|
||||
SHA1 (patch-af) = a2b55359d65c60ecb7e7d79390ef872873c0eba1
|
||||
SHA1 (patch-ah) = cc48e36406b6d9e4cf88179510824135507aa6f9
|
||||
SHA1 (patch-src_file.c) = 6a801513eae47f30eb5f9b7857c7b40b30063129
|
||||
|
|
33
emulators/fceu/patches/patch-src_file.c
Normal file
33
emulators/fceu/patches/patch-src_file.c
Normal file
|
@ -0,0 +1,33 @@
|
|||
$NetBSD: patch-src_file.c,v 1.1 2017/02/14 21:29:39 joerg Exp $
|
||||
|
||||
Newer zlib expects gzgetc argument to be correctly typed.
|
||||
|
||||
--- src/file.c.orig 2017-02-09 16:51:34.243801811 +0000
|
||||
+++ src/file.c
|
||||
@@ -154,7 +154,7 @@ static MEMWRAP *MakeMemWrap(void *tz, in
|
||||
{
|
||||
/* Bleck. The gzip file format has the size of the uncompressed data,
|
||||
but I can't get to the info with the zlib interface(?). */
|
||||
- for(tmp->size=0; gzgetc(tz) != EOF; tmp->size++);
|
||||
+ for(tmp->size=0; gzgetc((gzFile)tz) != EOF; tmp->size++);
|
||||
gzseek(tz,0,SEEK_SET);
|
||||
if(!(tmp->data=(uint8 *)FCEU_malloc(tmp->size)))
|
||||
{
|
||||
@@ -529,7 +529,7 @@ int FCEU_read32le(uint32 *Bufo, FCEUFILE
|
||||
int FCEU_fgetc(FCEUFILE *fp)
|
||||
{
|
||||
if(fp->type==1)
|
||||
- return gzgetc(fp->fp);
|
||||
+ return gzgetc((gzFile)fp->fp);
|
||||
else if(fp->type>=2)
|
||||
{
|
||||
MEMWRAP *wz;
|
||||
@@ -549,7 +549,7 @@ uint64 FCEU_fgetsize(FCEUFILE *fp)
|
||||
int x,t;
|
||||
t=gztell(fp->fp);
|
||||
gzrewind(fp->fp);
|
||||
- for(x=0; gzgetc(fp->fp) != EOF; x++);
|
||||
+ for(x=0; gzgetc((gzFile)fp->fp) != EOF; x++);
|
||||
gzseek(fp->fp,t,SEEK_SET);
|
||||
return(x);
|
||||
}
|
Loading…
Reference in a new issue