X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fposix%2FOSMem.c;h=66f6309bb09565cb48cd617bd4591fafb35d521d;hb=f5edc6b0871a0debbc9a64f4cdb95c0dc35e5b16;hp=9e6e62b95c620922f317e77a30384ec3ba212284;hpb=016bac72c041e8589ece82fe86906fc9cf8f950c;p=ghc-hetmet.git diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c index 9e6e62b..66f6309 100644 --- a/rts/posix/OSMem.c +++ b/rts/posix/OSMem.c @@ -25,6 +25,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_FCNTL_H +#include +#endif #include @@ -93,7 +96,7 @@ my_mmap (void *addr, lnat size) // Let's just use the underlying Mach Microkernel calls directly, // they're much nicer. - kern_return_t err; + kern_return_t err = 0; ret = addr; if(addr) // try to allocate at adress err = vm_allocate(mach_task_self(),(vm_address_t*) &ret, size, FALSE);