From: Kevin O'Connor Date: Sun, 12 Jul 2009 13:12:32 +0000 (-0400) Subject: Add u64 cast to READ64_SEG() macro to fix vga compiling. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=96f6fcd2bd60230cffb09edbea88df3b92517f3a;p=seabios.git Add u64 cast to READ64_SEG() macro to fix vga compiling. Cast is needed when pulling pointers or other non-int types. --- diff --git a/src/farptr.h b/src/farptr.h index 360b28e..a270f87 100644 --- a/src/farptr.h +++ b/src/farptr.h @@ -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) \