1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

openssl: Detect the availability of RAND_egd (tiny change)

Alternatives like LibreSSL don't provide RAND_egd() anymore.
Fixes compilation on OpenBSD.
This commit is contained in:
Jérémie Courrèges-Anglas 2014-12-01 13:43:22 +01:00 committed by Tim Rühsen
parent b8c567a3ef
commit b5778699f0
2 changed files with 3 additions and 0 deletions

View File

@ -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.])

View File

@ -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;