diff options
author | simonmar@microsoft.com <unknown> | 2006-05-30 10:14:18 +0000 |
---|---|---|
committer | simonmar@microsoft.com <unknown> | 2006-05-30 10:14:18 +0000 |
commit | 7a876582088a557b4ac978f272c91e7f4aa2eacf (patch) | |
tree | 339444350f9e0823106d68d82710b8d16153c5f8 /rts/win32/OSMem.c | |
parent | e3c55aebd4f9ce7a5b4390d4726612865fd207f2 (diff) | |
download | haskell-7a876582088a557b4ac978f272c91e7f4aa2eacf.tar.gz |
fix Win32 build
Diffstat (limited to 'rts/win32/OSMem.c')
-rw-r--r-- | rts/win32/OSMem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c index fe69a341e8..356c6dffa4 100644 --- a/rts/win32/OSMem.c +++ b/rts/win32/OSMem.c @@ -7,6 +7,8 @@ * ---------------------------------------------------------------------------*/ #include <windows.h> +#include "Rts.h" +#include "OSMem.h" lnat getPageSize (void) { @@ -24,11 +26,11 @@ lnat getPageSize (void) void setExecutable (void *p, lnat len, rtsBool exec) { DWORD dwOldProtect = 0; - if (VirtualProtect (addr, len, + if (VirtualProtect (p, len, exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE, &dwOldProtect) == 0) { barf("makeExecutable: failed to protect 0x%p; error=%lu; old protection: %lu\n", - addr, (unsigned long)GetLastError(), (unsigned long)dwOldProtect); + p, (unsigned long)GetLastError(), (unsigned long)dwOldProtect); } } |