Add u64 cast to READ64_SEG() macro to fix vga compiling.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 12 Jul 2009 13:12:32 +0000 (09:12 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 12 Jul 2009 13:12:32 +0000 (09:12 -0400)
Cast is needed when pulling pointers or other non-int types.

src/farptr.h

index 360b28ee7dd30d0b41fb5c90f938ed6d87ebf011..a270f87a229456389052622bb95e7c9fdcbb61c0 100644 (file)
@@ -28,7 +28,7 @@ extern u16 __segment_FS, __segment_GS;
         union u64_u32_u *__r64_ptr = (union u64_u32_u *)&(var); \
         READ32_SEG(SEG, __value.hi, __r64_ptr->hi);             \
         READ32_SEG(SEG, __value.lo, __r64_ptr->lo);             \
-        (value) = __value.val;                                  \
+        *(u64*)&(value) = __value.val;                          \
     } while (0)
 #define WRITE8_SEG(SEG, var, value)                             \
     __asm__("movb %b1, %%" #SEG ":%0" : "=m"(var)               \