blob: 0b7e3a28a6d2cc8cf53f50005c457a0a7e10dcd7 [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
Andrew Geissler595f6302022-01-24 19:11:47 +00007Upstream-Status: Inappropriate [embedded specific]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05008
9Signed-off-by: Joe Slater <jslater@windriver.com>
10
Andrew Geissler595f6302022-01-24 19:11:47 +000011--- a/configure.ac
12+++ b/configure.ac
13@@ -2117,6 +2117,7 @@ AC_SUBST(systemdsystemunitdir)
Patrick Williamsb48b7b42016-08-17 15:04:38 -050014
15 dnl ----------------------------------------------------------------
16 dnl Check for entropy sources
17+dev=no
18 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
Andrew Geissler595f6302022-01-24 19:11:47 +000019 dev=no
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020 if test -r /dev/urandom ; then
Andrew Geissler595f6302022-01-24 19:11:47 +000021@@ -2131,9 +2132,11 @@ if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
Patrick Williamsb48b7b42016-08-17 15:04:38 -050022 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 Geissler595f6302022-01-24 19:11:47 +000029+ dev="/dev/urandom";
Patrick Williamsb48b7b42016-08-17 15:04:38 -050030+fi
31+if test $dev != no ; then
32+ AC_DEFINE_UNQUOTED(URANDOM_DEVICE,"$dev",[set to urandom device])
33 fi
34
35 dnl ----------------------------------------------------------------