blob: 96a03369a7516f51b80216c7dacd2b09a83768e3 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001openldap: assume /dev/urandom exists
2
3When we are cross-compiling, we want to assume
4that /dev/urandom exists. We could change the source
5code to look for it, but this is the easy way out.
6
7Upstream-Status: pending
8
9Signed-off-by: Joe Slater <jslater@windriver.com>
10
11
12--- a/configure.in
13+++ b/configure.in
Andrew Geissler97771a32021-03-05 15:23:11 -060014@@ -2153,8 +2153,8 @@ fi
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015
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
Andrew Geissler97771a32021-03-05 15:23:11 -060024@@ -2167,9 +2167,11 @@ if test $cross_compiling != yes && test
Patrick Williamsb48b7b42016-08-17 15:04:38 -050025 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 ----------------------------------------------------------------