From 3024af3685be9eb618352bd17ba37953d8076946 Mon Sep 17 00:00:00 2001
From: Christian Beier <dontmind@freeshell.org>
Date: Thu, 17 Jan 2019 14:05:53 +0100
Subject: [PATCH] unixpw: don't try to use crypt() when it isn't available

Closes #86
---
 src/unixpw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/unixpw.c b/src/unixpw.c
index 9a43cec..e2cb016 100644
--- a/src/unixpw.c
+++ b/src/unixpw.c
@@ -757,7 +757,7 @@ int unixpw_list_match(char *user) {
 }
 
 int crypt_verify(char *user, char *pass) {
-#ifndef UNIXPW_CRYPT
+#if !defined UNIXPW_CRYPT || !defined HAVE_LIBCRYPT
 	return 0;
 #else
 	struct passwd *pwd;
