diff options
author | Yuta Saito <[email protected]> | 2024-08-29 17:06:19 +0000 |
---|---|---|
committer | Alan Wu <[email protected]> | 2024-08-29 14:09:35 -0400 |
commit | 591a157b0f95dff3ce6be0956a77c7605d122243 (patch) | |
tree | 277f5978c963d392153baf0015add3b371c1a53d /prism_compile.c | |
parent | e07f794967abfca691a275ebdbf0bfc2268a6057 (diff) |
prism_compile.c: Fix read_entire_file() for platforms without file mmap
Apply similar fix to https://github.com/ruby/prism/pull/2944
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11500
Diffstat (limited to 'prism_compile.c')
-rw-r--r-- | prism_compile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/prism_compile.c b/prism_compile.c index e2f123c810..dd2e30865a 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -10616,6 +10616,8 @@ read_entire_file(pm_string_t *string, const char *filepath) close(fd); *string = (pm_string_t) { .type = PM_STRING_MAPPED, .source = source, .length = size }; return true; +#else + return pm_string_file_init(string, filepath); #endif } |