Skip to content

Commit

Permalink
Return the actual error from the call to mmap
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpotter committed Apr 23, 2019
1 parent ba7f31b commit e2eb18e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mono/metadata/file-mmap-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,8 @@ mono_mmap_map (void *handle, gint64 offset, gint64 *size, int access, void **mma
return 0;
}

return COULD_NOT_MAP_MEMORY;
int error_number = errno;
return error_number != 0 ? error_number : COULD_NOT_MAP_MEMORY;
}

gboolean
Expand Down

0 comments on commit e2eb18e

Please sign in to comment.