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