Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2013 23:45:34 GMT
From:      David Demelier <demelier.david@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/181413: [patch] emulators/visualboyadvance-m: unbreak build
Message-ID:  <201308192345.r7JNjYXZ025086@oldred.freebsd.org>
Resent-Message-ID: <201308192350.r7JNo1hH057683@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         181413
>Category:       ports
>Synopsis:       [patch] emulators/visualboyadvance-m: unbreak build
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 19 23:50:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     David Demelier
>Release:        9.2-PRERELEASE
>Organization:
>Environment:
FreeBSD Melon 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0 r254444M: Mon Aug 19 13:40:49 CEST 2013     root@Melon:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
emulators/visualboyadvance-m is broken for months (even years maybe). This little patch add some casts needed.
>How-To-Repeat:

>Fix:
--- vbam.diff begins here ---
--- /dev/null   2013-08-20 01:42:17.000000000 +0200
+++ files/patch-fex-fex-Data_Reader.cpp 2013-08-20 01:41:05.000000000 +0200
@@ -0,0 +1,36 @@
+--- fex/fex/Data_Reader.cpp.orig       2013-08-20 01:33:22.000000000 +0200
++++ fex/fex/Data_Reader.cpp    2013-08-20 01:36:12.000000000 +0200
+@@ -732,11 +732,11 @@
+ 
+ blargg_err_t Gzip_File_Reader::read_v( void* p, int s )
+ {
+-      int result = gzread( file_, p, s );
++      int result = gzread( static_cast<gzFile_s *>(file_), p, s );
+       if ( result != s )
+       {
+               if ( result < 0 )
+-                      return convert_gz_error( file_ );
++                      return convert_gz_error( static_cast<gzFile_s *>(file_) );
+ 
+               return blargg_err_file_corrupt;
+       }
+@@ -746,8 +746,8 @@
+ 
+ blargg_err_t Gzip_File_Reader::seek_v( int n )
+ {
+-      if ( gzseek( file_, n, SEEK_SET ) < 0 )
+-              return convert_gz_error( file_ );
++      if ( gzseek( static_cast<gzFile_s *>(file_), n, SEEK_SET ) < 0 )
++              return convert_gz_error( static_cast<gzFile_s *>(file_) );
+ 
+       return blargg_ok;
+ }
+@@ -756,7 +756,7 @@
+ {
+       if ( file_ )
+       {
+-              if ( gzclose( file_ ) )
++              if ( gzclose( static_cast<gzFile_s *>(file_) ) )
+                       check( false );
+               file_ = NULL;
+       }
--- /dev/null   2013-08-20 01:42:17.000000000 +0200
+++ files/patch-src-Util.cpp    2013-08-20 01:41:42.000000000 +0200
@@ -0,0 +1,11 @@
+--- src/Util.cpp.orig  2013-08-20 01:36:47.000000000 +0200
++++ src/Util.cpp       2013-08-20 01:37:17.000000000 +0200
+@@ -544,7 +544,7 @@
+ 
+ gzFile utilGzOpen(const char *file, const char *mode)
+ {
+-  utilGzWriteFunc = (int (ZEXPORT *)(void *,void * const, unsigned int))gzwrite;
++  utilGzWriteFunc = (int (ZEXPORT *)(gzFile_s *,void * const, unsigned int))gzwrite;
+   utilGzReadFunc = gzread;
+   utilGzCloseFunc = gzclose;
+   utilGzSeekFunc = gzseek;
--- vbam.diff ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308192345.r7JNjYXZ025086>