projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
69db8ad
)
fix the build when !USE_MMAP
author
Simon Marlow
<marlowsd@gmail.com>
Fri, 21 Nov 2008 08:54:18 +0000
(08:54 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Fri, 21 Nov 2008 08:54:18 +0000
(08:54 +0000)
rts/Linker.c
patch
|
blob
|
history
diff --git
a/rts/Linker.c
b/rts/Linker.c
index
3b2dd1e
..
7c1cd40
100644
(file)
--- a/
rts/Linker.c
+++ b/
rts/Linker.c
@@
-1464,7
+1464,6
@@
loadObj( char *path )
close(fd);
#else /* !USE_MMAP */
close(fd);
#else /* !USE_MMAP */
-
/* load the image into memory */
f = fopen(path, "rb");
if (!f)
/* 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
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 */
fclose(f);
#endif /* USE_MMAP */