From a94201243ec3436304f5f1fae160e996470af51d Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 1 Jun 2016 13:17:31 +0000 Subject: [PATCH] string.c: fallback to crypt_r * string.c: prefer crypt_r to crypt iff system crypt nor crypt_r are not provided. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/string.c b/string.c index 711fd9c39e..ad4a115c42 100644 --- a/string.c +++ b/string.c @@ -29,8 +29,11 @@ #include #endif -#ifdef HAVE_CRYPT_R -#include +#if defined HAVE_CRYPT_R +# include +#elif !defined HAVE_CRYPT +# include "missing/crypt.h" +# define HAVE_CRYPT_R 1 #endif #define STRING_ENUMERATORS_WANTARRAY 0 /* next major */