Fix the build for the FB engine on non-x86 architectures.

SVN revision: 27430
This commit is contained in:
ningerso 2006-12-13 20:25:04 +00:00 committed by ningerso
parent 73af9d0e82
commit b848372508
1 changed files with 1 additions and 1 deletions

View File

@ -530,7 +530,7 @@ fb_postinit(FB_Mode *mode)
fb_cleanup();
exit(1);
}
mode->mem_offset = (unsigned)(fb_fix.smem_start) & (~PAGE_MASK);
mode->mem_offset = (unsigned)(fb_fix.smem_start) & (getpagesize()-1);
mode->mem = (unsigned char *)mmap(NULL, fb_fix.smem_len + mode->mem_offset,
PROT_WRITE | PROT_READ, MAP_SHARED, fb, 0);
if ((int)mode->mem == -1)