libsdl PAGE_SIZE patch
Joshua Profitt <[email protected]> Tue, 05 Dec 2006 19:26:54 -0500
| Newsgroups | gmane.linux.ports.game-cube.devel |
|---|---|
| Message-ID | <[email protected]> |
hey, I had some trouble getting libsdl to compile. It looks like getting PAGE_SIZE from asm/page.h is not longer supported. Here's the fix in case somebody else runs into this. josh ------------------------------------------------------------------------- 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 _______________________________________________ Gc-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gc-linux-devel
libsdl_page_size.diff
(text/plain, 991 B)
Index: libsdl/src/video/gc/SDL_gcvideo.c =================================================================== RCS file: /cvsroot/gc-linux/libsdl/src/video/gc/SDL_gcvideo.c,v retrieving revision 1.4 diff -u -r1.4 SDL_gcvideo.c --- libsdl/src/video/gc/SDL_gcvideo.c 21 Mar 2006 22:36:38 -0000 1.4 +++ libsdl/src/video/gc/SDL_gcvideo.c 6 Dec 2006 00:36:13 -0000 @@ -36,7 +36,7 @@ #include <errno.h> #include <sys/ioctl.h> #include <sys/mman.h> -#include <asm/page.h> /* For definition of PAGE_SIZE */ +//#include <asm/page.h> /* For definition of PAGE_SIZE */ #include "SDL.h" #include "SDL_error.h" @@ -261,7 +261,7 @@ /* Memory map the device, compensating for buggy PPC mmap() */ offset = (((long)finfo.smem_start) - - (((long)finfo.smem_start) & ~(PAGE_SIZE - 1))); + (((long)finfo.smem_start) & ~(sysconf(_SC_PAGESIZE) - 1))); mapped_memlen = finfo.smem_len + offset; mapped_mem = mmap(NULL, mapped_memlen, PROT_READ | PROT_WRITE, MAP_SHARED, console_fd, 0);