mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
prism_compile.c: Fix read_entire_file() for platforms without file mmap
Apply similar fix to https://github.com/ruby/prism/pull/2944
This commit is contained in:
parent
e07f794967
commit
591a157b0f
Notes:
git
2024-08-29 18:09:54 +00:00
1 changed files with 2 additions and 0 deletions
|
@ -10616,6 +10616,8 @@ read_entire_file(pm_string_t *string, const char *filepath)
|
||||||
close(fd);
|
close(fd);
|
||||||
*string = (pm_string_t) { .type = PM_STRING_MAPPED, .source = source, .length = size };
|
*string = (pm_string_t) { .type = PM_STRING_MAPPED, .source = source, .length = size };
|
||||||
return true;
|
return true;
|
||||||
|
#else
|
||||||
|
return pm_string_file_init(string, filepath);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue