aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--string.c7
1 files 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 <unistd.h>
#endif
-#ifdef HAVE_CRYPT_R
-#include <crypt.h>
+#if defined HAVE_CRYPT_R
+# include <crypt.h>
+#elif !defined HAVE_CRYPT
+# include "missing/crypt.h"
+# define HAVE_CRYPT_R 1
#endif
#define STRING_ENUMERATORS_WANTARRAY 0 /* next major */