build: Don't use /dev/srandom on OpenBSD.
authorJeremie Courreges-Anglas <jca@wxcvbn.org>
Mon, 6 Nov 2017 05:57:28 +0000 (14:57 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 6 Nov 2017 05:57:28 +0000 (14:57 +0900)
--

Ported from GnuPG 1.4.

All /dev/*random devices have been equivalent since OpenBSD 4.9, on
purpose (/dev/random doesn't block).  /dev/srandom has been removed in
the OpenBSD 6.3 development cycle, /dev/arandom will likely follow.

Signed-off-by: Jeremie Courreges-Anglas <jca@wxcvbn.org>
configure.ac

index 86035a4..57b840e 100644 (file)
@@ -316,21 +316,8 @@ case "${host}" in
         ;;
 esac
 
-#
-# Figure out the name of the random device
-#
-case "${host}" in
-    *-openbsd*)
-        NAME_OF_DEV_RANDOM="/dev/srandom"
-        NAME_OF_DEV_URANDOM="/dev/urandom"
-        ;;
-
-    *)
-        NAME_OF_DEV_RANDOM="/dev/random"
-        NAME_OF_DEV_URANDOM="/dev/urandom"
-        ;;
-esac
-
+NAME_OF_DEV_RANDOM="/dev/random"
+NAME_OF_DEV_URANDOM="/dev/urandom"
 
 AC_ARG_ENABLE(endian-check,
               AC_HELP_STRING([--disable-endian-check],