aboutsummaryrefslogtreecommitdiffstats
path: root/mjit.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-08 03:32:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-08 03:32:39 +0000
commit0b343021da7a139606c06aec5daa2f6f6097461a (patch)
treed942db6bf010aea38ea00862e22cfc0db710aa44 /mjit.c
parent7aea1e657d6b391b16353e522adad00e71a1d180 (diff)
downloadruby-0b343021da7a139606c06aec5daa2f6f6097461a.tar.gz
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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mjit.c b/mjit.c
index da3558da54..78c50d10d5 100644
--- a/mjit.c
+++ b/mjit.c
@@ -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);