diff -r 86c612397e90 -r b91f45b92fe5 core/sourcehook/sh_memory.h --- a/core/sourcehook/sh_memory.h Mon Dec 29 11:42:44 2008 -0600 +++ b/core/sourcehook/sh_memory.h Wed Feb 25 22:40:11 2009 -0600 @@ -26,6 +26,7 @@ # include # include # include +# include // http://www.die.net/doc/linux/man/man2/mprotect.2.html # include # ifndef PAGESIZE @@ -37,8 +38,8 @@ // We need to align addr down to pagesize on linux // We assume PAGESIZE is a power of two -# define SH_LALIGN(x) (void*)((intptr_t)(x) & ~(PAGESIZE-1)) -# define SH_LALDIF(x) ((intptr_t)(x) % PAGESIZE) +# define SH_LALIGN(x) (void*)((uintptr_t)(x) & ~(PAGESIZE-1)) +# define SH_LALDIF(x) ((uintptr_t)(x) % PAGESIZE) # else # error Unsupported OS/Compiler # endif