blob: e7b988fafde3c195992d9e584aa0c0c8db53b123 [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
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 ----------------------------------------------------------------