diff --git a/configure.ac b/configure.ac index ff016ce9..c49235ef 100644 --- a/configure.ac +++ b/configure.ac @@ -392,6 +392,7 @@ AS_IF([test x"$with_ssl" = xopenssl], [ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL]) AC_LIBOBJ([openssl]) LIBS="$LIBSSL $LIBS" + AC_CHECK_FUNCS([RAND_egd]) elif test x"$with_ssl" != x then AC_MSG_ERROR([--with-ssl=openssl was given, but SSL is not available.]) diff --git a/src/openssl.c b/src/openssl.c index 68cd11a1..e74bdd0a 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -91,9 +91,11 @@ init_prng (void) if (RAND_status ()) return; +#ifdef HAVE_RAND_EGD /* Get random data from EGD if opt.egd_file was used. */ if (opt.egd_file && *opt.egd_file) RAND_egd (opt.egd_file); +#endif if (RAND_status ()) return;