diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-08 03:32:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-08 03:32:39 +0000 |
commit | 0b343021da7a139606c06aec5daa2f6f6097461a (patch) | |
tree | d942db6bf010aea38ea00862e22cfc0db710aa44 /mjit.c | |
parent | 7aea1e657d6b391b16353e522adad00e71a1d180 (diff) |
Fix compile error at r66280
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -423,6 +423,7 @@ init_header_filename(void) } else #endif +#ifndef _MSC_VER { /* A name of the header file included in any C file generated by MJIT for iseqs. */ static const char header_name[] = MJIT_HEADER_INSTALL_DIR "/" MJIT_MIN_HEADER_NAME; @@ -431,9 +432,7 @@ init_header_filename(void) header_file = xmalloc(baselen + header_name_len + 1); p = append_str2(header_file, basedir, baselen); p = append_str2(p, header_name, header_name_len + 1); - } -#ifndef _MSC_VER - { + if ((fd = rb_cloexec_open(header_file, O_RDONLY, 0)) < 0) { verbose(1, "Cannot access header file: %s", header_file); xfree(header_file); @@ -451,7 +450,7 @@ init_header_filename(void) } #else { - static const char pch_name[] = MJIT_PRECOMPILED_HEADER_NAME; + static const char pch_name[] = MJIT_HEADER_INSTALL_DIR "/" MJIT_PRECOMPILED_HEADER_NAME; const size_t pch_name_len = sizeof(pch_name) - 1; pch_file = xmalloc(baselen + pch_name_len + 1); |