From f9e755241ad462e32ba0170b9110df7a107d5927 Mon Sep 17 00:00:00 2001 From: Jafar Al-Gharaibeh Date: Tue, 1 Aug 2017 15:04:26 -0500 Subject: [PATCH] config: If we don't have crypt but we have ssl crypto, use it Signed-off-by: Jafar Al-Gharaibeh --- configure.ac | 3 ++- lib/zebra.h | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8cc70f8a99..1f6ea14d4d 100755 --- a/configure.ac +++ b/configure.ac @@ -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 --------------------------- diff --git a/lib/zebra.h b/lib/zebra.h index 8e1c4db804..7aedf84817 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -126,6 +126,13 @@ typedef unsigned char u_int8_t; #define __APPLE_USE_RFC_3542 #endif +#ifndef HAVE_LIBCRYPT +# ifdef HAVE_LIBCRYPTO +# include +# define crypt DES_crypt +# endif +#endif + #include "openbsd-tree.h" #include -- 2.39.5