summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-12 17:10:29 +0000
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-12 17:10:29 +0000
commita82aaea71902bd18b87179698d88ca4f9fa0359b (patch)
tree9ecfa8a6061389866059a5f59e227770eb67f88c /string.c
parent0b845a845811f4b48e5bfdaa1ba1e2fc5f50dccc (diff)
string.c: fix up r60748
An #ifdef was missing in r60748 and build broke on systems without crypt_r(). https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20171112T162503Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/string.c b/string.c
index 983fa919fa..6f91cd3878 100644
--- a/string.c
+++ b/string.c
@@ -8889,7 +8889,9 @@ rb_str_crypt(VALUE str, VALUE salt)
rb_sys_fail("crypt");
}
result = rb_str_new_cstr(res);
+#ifdef HAVE_CRYPT_R
ALLOCV_END(databuf);
+#endif
FL_SET_RAW(result, OBJ_TAINTED_RAW(str) | OBJ_TAINTED_RAW(salt));
return result;
}