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 Jan 24, 2020
1 parent dd18220 commit 1e4c2e9
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 @@ -551,7 +551,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;
}

MonoBoolean
Expand Down

0 comments on commit 1e4c2e9

Please sign in to comment.