summaryrefslogtreecommitdiff
path: root/mystdlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'mystdlib.c')
-rw-r--r--mystdlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mystdlib.c b/mystdlib.c
index b53beca..56edcb9 100644
--- a/mystdlib.c
+++ b/mystdlib.c
@@ -22,7 +22,7 @@ MAP map_file( char *filename, int readonly )
22 { 22 {
23 fstat( map->fh, &fstatus ); 23 fstat( map->fh, &fstatus );
24 if( ( map->addr = mmap( NULL, map->size = (size_t)fstatus.st_size, 24 if( ( map->addr = mmap( NULL, map->size = (size_t)fstatus.st_size,
25 PROT_READ | ( readonly ? 0 : PROT_WRITE), (readonly ? 0 : MAP_SHARED), map->fh, 0) ) == MAP_FAILED ) 25 PROT_READ | ( readonly ? 0 : PROT_WRITE), (readonly ? MAP_PRIVATE : MAP_SHARED), map->fh, 0) ) == MAP_FAILED )
26 { 26 {
27 fprintf( stderr, "Mapping file '%s' failed\n", filename ); 27 fprintf( stderr, "Mapping file '%s' failed\n", filename );
28 close( map->fh ); free( map ); map = NULL; 28 close( map->fh ); free( map ); map = NULL;