Bug 89876 - Dosbox + Daggerfall on AMD64 needs a patch to work
Bug#: 89876 Product:  Gentoo Linux Version: 2005.0 Platform: AMD64
OS/Version: Linux Status: RESOLVED Severity: trivial Priority: P2
Resolution: FIXED Assigned To: games@gentoo.org Reported By: dcatz@nc.rr.com
Component: Ebuilds
URL:  http://sourceforge.net/tracker/index.php?func=detail&aid=1180880&group_id=52551&atid=467232
Summary: Dosbox + Daggerfall on AMD64 needs a patch to work
Keywords:  Inclusion
Status Whiteboard: 
Opened: 2005-04-20 16:55 0000
Description:   Opened: 2005-04-20 16:55 0000
In order for Daggerfall (and potentially some other games as well) to work on
AMD64 systems when Dosbox is compiled as 64-bit, a change needs to be made to
drive_local.cpp or Daggerfall crashes before you can play the game. 

The following patch should fix the problem and Peter Veenstra, one of the
Dosbox Coders plans to commit it to the CVS shortly. However since the ebuild
doesn't run off the CVS, perhaps the patch should be included since the bug in
question breaks some of Dosbox's functionality.

The patch is as follows :
--- drive_local.cpp     2005-03-25 04:11:08.000000000 -0500
+++ drive_local_new.cpp 2005-04-20 16:12:57.000000000 -0400
@@ -420,7 +420,7 @@
        //TODO Give some doserrorcode;
                return false;//ERROR
        }
-       int ret=fseek(fhandle,*pos,seektype);
+       int ret=fseek(fhandle,*reinterpret_cast<Bit32s*>(pos),seektype);
        if (ret!=0) {
                // Out of file range, pretend everythings ok
                // and move file pointer top end of file... ?! (Black Thorne)

------- Comment #1 From Simon Stelling (RETIRED) 2005-07-11 08:17:50 0000 -------
games herd/mr_bones_: i put a slightly different patch in, but currently it
gets
only applied when 'use amd64' is true, since i'm not sure whether it might
break
32bit arches. could you please test it and remove the 'use amd64' if it works?
tia

------- Comment #2 From Mr. Bones. 2005-07-11 09:39:36 0000 -------
Looks fine.  The same patch is in dosbox-cvs upstream already.  I made it
unconditional in the ebuild.  Next time, I'd prefer to be CC'd earlier in the
process.    Thanks.