tags 664933 + patch
thanks

On 21/03/12 21:26, Lucas Nussbaum wrote:
> Relevant part:
>> gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" 
>> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"fceu\" 
>> -DVERSION=\"0.98.12\" -D_GNU_SOURCE=1 -DHAVE_ASPRINTF=1 -DHAVE_LIBZ=1 
>> -DNETWORK=1 -DUNIX=1 -DPSS_STYLE=1 -DNETWORK=1 -DSTDC_HEADERS=1 
>> -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
>> -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
>> -DHAVE_UNISTD_H=1 -DUSE_SEXYAL=1 -DOPENGL=1 -DSDL=1 -DLSB_FIRST=1 
>> -DFCEU_VERSION=\"0.98.12\" -DFCEU_VERSION_NUMERIC=9812 -DFRAMESKIP=1     
>> -Wall -fomit-frame-pointer  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  
>> -Wall -fomit-frame-pointer -O3 -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 
>> -D_REENTRANT -c -o file.o `test -f 'file.c' || echo './'`file.c
>> file.c: In function 'MakeMemWrap':
>> file.c:157:20: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:157:20: error: request for member 'have' in something not a structure 
>> or union
>> file.c:157:20: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:157:20: error: request for member 'have' in something not a structure 
>> or union
>> file.c:157:20: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:157:20: error: request for member 'pos' in something not a structure 
>> or union
>> file.c:157:20: warning: left-hand operand of comma expression has no effect 
>> [-Wunused-value]
>> file.c:157:20: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:157:20: error: request for member 'next' in something not a structure 
>> or union
>> file.c:157:20: warning: left-hand operand of comma expression has no effect 
>> [-Wunused-value]
>> file.c: In function 'FCEU_read16le':
>> file.c:478:4: warning: dereferencing type-punned pointer will break 
>> strict-aliasing rules [-Wstrict-aliasing]
>> file.c: In function 'FCEU_read32le':
>> file.c:507:4: warning: dereferencing type-punned pointer will break 
>> strict-aliasing rules [-Wstrict-aliasing]
>> file.c:519:3: warning: dereferencing type-punned pointer will break 
>> strict-aliasing rules [-Wstrict-aliasing]
>> file.c: In function 'FCEU_fgetc':
>> file.c:532:10: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:532:10: error: request for member 'have' in something not a structure 
>> or union
>> file.c:532:10: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:532:10: error: request for member 'have' in something not a structure 
>> or union
>> file.c:532:10: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:532:10: error: request for member 'pos' in something not a structure 
>> or union
>> file.c:532:10: warning: left-hand operand of comma expression has no effect 
>> [-Wunused-value]
>> file.c:532:10: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:532:10: error: request for member 'next' in something not a structure 
>> or union
>> file.c:532:10: warning: left-hand operand of comma expression has no effect 
>> [-Wunused-value]
>> file.c: In function 'FCEU_fgetsize':
>> file.c:552:12: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:552:12: error: request for member 'have' in something not a structure 
>> or union
>> file.c:552:12: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:552:12: error: request for member 'have' in something not a structure 
>> or union
>> file.c:552:12: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:552:12: error: request for member 'pos' in something not a structure 
>> or union
>> file.c:552:12: warning: left-hand operand of comma expression has no effect 
>> [-Wunused-value]
>> file.c:552:12: warning: dereferencing 'void *' pointer [enabled by default]
>> file.c:552:12: error: request for member 'next' in something not a structure 
>> or union
>> file.c:552:12: warning: left-hand operand of comma expression has no effect 
>> [-Wunused-value]
>> file.c: In function 'FCEU_fgetc':
>> file.c:543:1: warning: control reaches end of non-void function 
>> [-Wreturn-type]
>> make[3]: *** [file.o] Error 1

Please find attached a patch to fix this FTBFS.

Regards
-- 
Sebastian Ramacher
diff -Nru fceu-0.98.12/debian/changelog fceu-0.98.12/debian/changelog
--- fceu-0.98.12/debian/changelog	2011-02-06 21:36:00.000000000 +0100
+++ fceu-0.98.12/debian/changelog	2012-04-18 16:39:07.000000000 +0200
@@ -1,3 +1,11 @@
+fceu (0.98.12-4.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * debian/patches: Add patch cast_to_gzfile.patch to fix FTBFS due to
+    changes in zlib (Closes: #664933).
+
+ -- Sebastian Ramacher <s.ramac...@gmx.at>  Wed, 18 Apr 2012 16:02:46 +0200
+
 fceu (0.98.12-4) unstable; urgency=low
 
   * The "Yay for squeeze release!" release.
diff -Nru fceu-0.98.12/debian/patches/cast_to_gzfile.patch fceu-0.98.12/debian/patches/cast_to_gzfile.patch
--- fceu-0.98.12/debian/patches/cast_to_gzfile.patch	1970-01-01 01:00:00.000000000 +0100
+++ fceu-0.98.12/debian/patches/cast_to_gzfile.patch	2012-04-18 16:35:43.000000000 +0200
@@ -0,0 +1,36 @@
+Description: cast arguments for gzgetc to gzFile
+ gzgetc is a macro expecting an argument of type gzFile so the argument has to
+ be casted to gzFile.
+Author: Sebastian Ramacher <s.ramac...@gmx.at>
+Last-Update: 2012-04-18
+Bug-Debian: http://bugs.debian.org/664933
+
+--- fceu-0.98.12.orig/src/file.c
++++ fceu-0.98.12/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);
+  }
diff -Nru fceu-0.98.12/debian/patches/series fceu-0.98.12/debian/patches/series
--- fceu-0.98.12/debian/patches/series	2011-02-06 20:56:47.000000000 +0100
+++ fceu-0.98.12/debian/patches/series	2012-04-18 16:37:14.000000000 +0200
@@ -1,3 +1,4 @@
 fix_fceu_manpage
 554281-fix_FTBFS_using_gold
 update_autotools
+cast_to_gzfile.patch

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to