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 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7 | Upstream-Status: Inappropriate [embedded specific] |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 8 | |
| 9 | Signed-off-by: Joe Slater <jslater@windriver.com> |
| 10 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 11 | --- a/configure.ac |
| 12 | +++ b/configure.ac |
| 13 | @@ -2117,6 +2117,7 @@ AC_SUBST(systemdsystemunitdir) |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 14 | |
| 15 | dnl ---------------------------------------------------------------- |
| 16 | dnl Check for entropy sources |
| 17 | +dev=no |
| 18 | if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 19 | dev=no |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 20 | if test -r /dev/urandom ; then |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 21 | @@ -2131,9 +2132,11 @@ if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 22 | dev="/idev/random"; |
| 23 | fi |
| 24 | |
| 25 | - if test $dev != no ; then |
| 26 | - AC_DEFINE_UNQUOTED(URANDOM_DEVICE,"$dev",[set to urandom device]) |
| 27 | - fi |
| 28 | +elif test $cross_compiling == yes ; then |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 29 | + dev="/dev/urandom"; |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 30 | +fi |
| 31 | +if test $dev != no ; then |
| 32 | + AC_DEFINE_UNQUOTED(URANDOM_DEVICE,"$dev",[set to urandom device]) |
| 33 | fi |
| 34 | |
| 35 | dnl ---------------------------------------------------------------- |