summaryrefslogtreecommitdiffstats
path: root/lib/libcxx/src/random.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcxx/src/random.cpp')
-rw-r--r--lib/libcxx/src/random.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libcxx/src/random.cpp b/lib/libcxx/src/random.cpp
index 4a2468368d0..9efac7a66a7 100644
--- a/lib/libcxx/src/random.cpp
+++ b/lib/libcxx/src/random.cpp
@@ -34,6 +34,7 @@
#include <nacl/nacl_random.h>
#endif
+#include <limits>
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -173,7 +174,11 @@ random_device::operator()()
double
random_device::entropy() const _NOEXCEPT
{
+#ifdef __OpenBSD__
+ return std::numeric_limits<unsigned int>::digits;
+#else
return 0;
+#endif
}
_LIBCPP_END_NAMESPACE_STD