Hi all,

while compiling Evas for powerpc I've encountered a problem with
PAGE_MASK being undefined. The proper way to detect the kernel page size
at runtime is through _SC_PAGE_SIZE, if I'm not mistaken.

If noone objects I'll commit the attached patch.


Falko
--- evas_fb_main.c      2006-09-30 09:02:41.000000000 +0000
+++ /root/evas_fb_main.c        2006-12-11 17:42:57.000000000 +0000
@@ -530,7 +530,7 @@
       fb_cleanup();
       exit(1);
     }
-  mode->mem_offset = (unsigned)(fb_fix.smem_start) & (~PAGE_MASK);
+  mode->mem_offset = (unsigned)(fb_fix.smem_start) & ~(sysconf(_SC_PAGE_SIZE));
   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)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to