termux-packages/x11-packages/bochs/bochs.h.patch
Leonid Pliushch 4abbaedfbc
Revert "bochs: build with -DANDROID (#468)"
Reverting bochs to previous attempt to fix "bus error", this one seem to
not work.
2022-04-18 14:48:00 +05:30

21 lines
858 B
Diff

--- a/bochs.h
+++ b/bochs.h
@@ -530,7 +530,7 @@
*((Bit16u*)(hostPtr)) = (nativeVar16)
#define WriteHostDWordToLittleEndian(hostPtr, nativeVar32) \
*((Bit32u*)(hostPtr)) = (nativeVar32)
-#ifdef ANDROID
+#if defined ANDROID || (defined __ANDROID__ && defined __arm__)
// Resolve problems with unaligned access
#define WriteHostQWordToLittleEndian(hostPtr, nativeVar64) { \
((Bit8u *)(hostPtr))[0] = (Bit8u) (nativeVar64); \
@@ -550,7 +550,7 @@
(nativeVar16) = *((Bit16u*)(hostPtr))
#define ReadHostDWordFromLittleEndian(hostPtr, nativeVar32) \
(nativeVar32) = *((Bit32u*)(hostPtr))
-#ifdef ANDROID
+#if defined ANDROID || (defined __ANDROID__ && defined __arm__)
// Resolve problems with unaligned access
#define ReadHostQWordFromLittleEndian(hostPtr, nativeVar64) { \
(nativeVar64) = ((Bit64u) ((Bit8u *)(hostPtr))[0]) | \