summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-11-21 08:54:18 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-11-21 08:54:18 +0000
commit51e6b90f8305ef9b50d7623908893f573b2f2116 (patch)
tree7e857908866acce8b24f9ba45f5a12e3f58a7dfb /rts
parent69db8adf9c151d9e997a95b09b14e2b0c740c6be (diff)
downloadhaskell-51e6b90f8305ef9b50d7623908893f573b2f2116.tar.gz
fix the build when !USE_MMAP
Diffstat (limited to 'rts')
-rw-r--r--rts/Linker.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index 3b2dd1e6a6..7c1cd40e85 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1464,7 +1464,6 @@ loadObj( char *path )
close(fd);
#else /* !USE_MMAP */
-
/* load the image into memory */
f = fopen(path, "rb");
if (!f)
@@ -1492,10 +1491,12 @@ loadObj( char *path )
oc->image = stgMallocBytes(oc->fileSize, "loadObj(image)");
# endif
- n = fread ( oc->image, 1, oc->fileSize, f );
- if (n != oc->fileSize)
- barf("loadObj: error whilst reading `%s'", path);
-
+ {
+ int n;
+ n = fread ( oc->image, 1, oc->fileSize, f );
+ if (n != oc->fileSize)
+ barf("loadObj: error whilst reading `%s'", path);
+ }
fclose(f);
#endif /* USE_MMAP */