diff options
Diffstat (limited to 'mystdlib.c')
-rw-r--r-- | mystdlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |