Commit 8155ba50 authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Fix OS X warnings

parent 224a7fa0
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <windows.h> #include <windows.h>
#endif #endif
#if darwin_HOST_OS #if darwin_HOST_OS
#include <mach/mach.h>
#include <mach/vm_map.h> #include <mach/vm_map.h>
#endif #endif
...@@ -200,7 +201,7 @@ my_mmap (void *addr, lnat size) ...@@ -200,7 +201,7 @@ my_mmap (void *addr, lnat size)
errorBelch("memory allocation failed (requested %lu bytes)", size); errorBelch("memory allocation failed (requested %lu bytes)", size);
stg_exit(EXIT_FAILURE); stg_exit(EXIT_FAILURE);
} else { } else {
vm_protect(mach_task_self(),ret,size,FALSE,VM_PROT_READ|VM_PROT_WRITE); vm_protect(mach_task_self(),(vm_address_t)ret,size,FALSE,VM_PROT_READ|VM_PROT_WRITE);
} }
#else #else
ret = mmap(addr, size, PROT_READ | PROT_WRITE | PROT_EXEC, ret = mmap(addr, size, PROT_READ | PROT_WRITE | PROT_EXEC,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment