projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(F)SLIT -> (f)sLit in MachCodeGen
[ghc-hetmet.git]
/
rts
/
posix
/
OSMem.c
diff --git
a/rts/posix/OSMem.c
b/rts/posix/OSMem.c
index
9e6e62b
..
66f6309
100644
(file)
--- a/
rts/posix/OSMem.c
+++ b/
rts/posix/OSMem.c
@@
-25,6
+25,9
@@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
#include <errno.h>
#include <errno.h>
@@
-93,7
+96,7
@@
my_mmap (void *addr, lnat size)
// Let's just use the underlying Mach Microkernel calls directly,
// they're much nicer.
// 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);
ret = addr;
if(addr) // try to allocate at adress
err = vm_allocate(mach_task_self(),(vm_address_t*) &ret, size, FALSE);