mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Align address of asm_runJIT down to nearest page boundary instead of up for mprotect on Linux and OS X (bug 5601, r=dvander).
This commit is contained in:
parent
895c856196
commit
af6ba72b0b
@ -936,7 +936,7 @@ int AMXAPI amx_Init(AMX *amx, void *program)
|
||||
|
||||
/* Linux already has mprotect() */
|
||||
/* But wants the address aligned! */
|
||||
#define ALIGN(addr) (char *)(((long)addr + sysconf(_SC_PAGESIZE)-1) & ~(sysconf(_SC_PAGESIZE)-1))
|
||||
#define ALIGN(addr) ((void *)((intptr_t)addr & ~(sysconf(_SC_PAGESIZE)-1)))
|
||||
|
||||
#else
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user