Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | openldap: assume /dev/urandom exists |
| 2 | |
| 3 | When we are cross-compiling, we want to assume |
| 4 | that /dev/urandom exists. We could change the source |
| 5 | code to look for it, but this is the easy way out. |
| 6 | |
| 7 | Upstream-Status: pending |
| 8 | |
| 9 | Signed-off-by: Joe Slater <jslater@windriver.com> |
| 10 | |
| 11 | |
| 12 | --- a/configure.in |
| 13 | +++ b/configure.in |
| 14 | @@ -2142,8 +2142,8 @@ fi |
| 15 | |
| 16 | dnl ---------------------------------------------------------------- |
| 17 | dnl Check for entropy sources |
| 18 | +dev=no |
| 19 | if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then |
| 20 | - dev=no |
| 21 | if test -r /dev/urandom ; then |
| 22 | dev="/dev/urandom"; |
| 23 | elif test -r /idev/urandom ; then |
| 24 | @@ -2156,9 +2156,11 @@ if test $cross_compiling != yes && test |
| 25 | dev="/idev/random"; |
| 26 | fi |
| 27 | |
| 28 | - if test $dev != no ; then |
| 29 | - AC_DEFINE_UNQUOTED(URANDOM_DEVICE,"$dev",[set to urandom device]) |
| 30 | - fi |
| 31 | +elif test $cross_compiling == yes ; then |
| 32 | + dev="/dev/urandom"; |
| 33 | +fi |
| 34 | +if test $dev != no ; then |
| 35 | + AC_DEFINE_UNQUOTED(URANDOM_DEVICE,"$dev",[set to urandom device]) |
| 36 | fi |
| 37 | |
| 38 | dnl ---------------------------------------------------------------- |