]> git.puffer.fish Git - mirror/frr.git/commitdiff
config: If we don't have crypt but we have ssl crypto, use it
authorJafar Al-Gharaibeh <jafar@atcorp.com>
Tue, 1 Aug 2017 20:04:26 +0000 (15:04 -0500)
committerJafar Al-Gharaibeh <jafar@atcorp.com>
Wed, 2 Aug 2017 15:01:17 +0000 (10:01 -0500)
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
configure.ac
lib/zebra.h

index 8cc70f8a99fcdba5504dc4f8a1184696f560603c..1f6ea14d4d9210cdfef720b9cd926fd025167420 100755 (executable)
@@ -1377,7 +1377,8 @@ AC_SUBST(VTYSH)
 AC_SUBST(CURSES)
 AC_SUBST(OSPFCLIENT)
 AC_SUBST(OSPFAPI)
-AC_CHECK_LIB(crypt, crypt)
+AC_CHECK_LIB(crypt, crypt, [],
+                   [AC_CHECK_LIB(crypto, DES_crypt)])
 AC_CHECK_LIB(resolv, res_init)
 
 dnl ---------------------------
index 8e1c4db8043a49cc446da7fc9610ce19836eca77..7aedf848174fc1e6bfdd29c43cefbdeefbef1cfc 100644 (file)
@@ -126,6 +126,13 @@ typedef unsigned char u_int8_t;
 #define __APPLE_USE_RFC_3542
 #endif
 
+#ifndef HAVE_LIBCRYPT
+#   ifdef HAVE_LIBCRYPTO
+#      include <openssl/des.h>
+#      define crypt DES_crypt
+#   endif
+#endif
+
 #include "openbsd-tree.h"
 
 #include <netinet/in.h>