aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
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 44823520f0..262289673e 100644
--- a/string.c
+++ b/string.c
@@ -8424,7 +8424,9 @@ rb_str_crypt(VALUE str, VALUE salt)
}
#endif
#ifdef HAVE_CRYPT_R
+# ifdef HAVE_STRUCT_CRYPT_DATA_INITIALIZED
data.initialized = 0;
+# endif
res = crypt_r(s, saltp, &data);
#else
res = crypt(s, saltp);