From 7a876582088a557b4ac978f272c91e7f4aa2eacf Mon Sep 17 00:00:00 2001 From: "simonmar@microsoft.com" Date: Tue, 30 May 2006 10:14:18 +0000 Subject: [PATCH] fix Win32 build --- rts/win32/OSMem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c index fe69a34..356c6df 100644 --- a/rts/win32/OSMem.c +++ b/rts/win32/OSMem.c @@ -7,6 +7,8 @@ * ---------------------------------------------------------------------------*/ #include +#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); } } -- 1.7.10.4