Package: basilisk2
Severity: normal
Tags: patch
When building 'basilisk2' on amd64 with gcc-4.0,
I get the following error:
g++ -I../include -I. -I../uae_cpu -DHAVE_CONFIG_H -DOS_linux
-DDIRECT_ADDRESSING -DUNALIGNED_PROFITABLE -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS
-DFPU_IEEE -D_REENTRANT -DDATADIR=\"/usr/share/BasiliskII\" -O2
-fno-merge-constants -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2
-I/usr/lib/glib/include -c ../ether.cpp -o obj/ether.o
../ether.cpp: In function 'void ether_udp_read(uint8*, int, sockaddr_in*)':
../ether.cpp:443: error: cast from 'uint8*' to 'uint32' loses precision
make[1]: *** [obj/ether.o] Error 1
make[1]: Leaving directory `/basilisk2-0.9.20030722/src/Unix'
make: *** [debian/stamp-makefile-build] Error 2
With the attached patch 'basilisk2' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/basilisk2-0.9.20030722/src/Unix/ether_unix.cpp
./src/Unix/ether_unix.cpp
--- ../tmp-orig/basilisk2-0.9.20030722/src/Unix/ether_unix.cpp 2002-02-07
16:10:55.000000000 +0000
+++ ./src/Unix/ether_unix.cpp 2005-02-26 14:51:49.000000000 +0000
@@ -420,7 +420,7 @@
M68kRegisters r;
r.d[0] = type;
// Packet type
r.d[1] = length - 14;
// Remaining packet length (without header, for ReadPacket)
- r.a[0] = (uint32)p + 14;
// Pointer to packet (host address, for ReadPacket)
+ r.a[0] = (unsigned long)p + 14;
// Pointer to packet (host address, for ReadPacket)
r.a[3] = ether_data + ed_RHA + 14;
// Pointer behind header in RHA
r.a[4] = ether_data + ed_ReadPacket;
// Pointer to ReadPacket/ReadRest routines
D(bug(" calling protocol handler %08x, type %08x,
length %08x, data %08x, rha %08x, read_packet %08x\n", handler, r.d[0], r.d[1],
r.a[0], r.a[3], r.a[4]));
diff -urN ../tmp-orig/basilisk2-0.9.20030722/src/ether.cpp ./src/ether.cpp
--- ../tmp-orig/basilisk2-0.9.20030722/src/ether.cpp 2002-02-07
16:10:55.000000000 +0000
+++ ./src/ether.cpp 2005-02-26 14:51:03.000000000 +0000
@@ -440,7 +440,7 @@
M68kRegisters r;
r.d[0] = type;
// Packet type
r.d[1] = length - 14;
// Remaining packet length (without header, for ReadPacket)
- r.a[0] = (uint32)packet + 14; //
Pointer to packet (host address, for ReadPacket)
+ r.a[0] = (unsigned long)packet + 14;
// Pointer to packet (host address, for ReadPacket)
r.a[3] = ether_data + ed_RHA + 14; //
Pointer behind header in RHA
r.a[4] = ether_data + ed_ReadPacket; // Pointer to
ReadPacket/ReadRest routines
D(bug(" calling protocol handler %08x, type %08x, length %08x, data
%08x, rha %08x, read_packet %08x\n", handler, r.d[0], r.d[1], r.a[0], r.a[3],
r.a[4]));
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]