[libcxx] random_device, specify optimal entropy properties for all OS's using arc4random()

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D122522
This commit is contained in:
Brad Smith 2022-03-28 22:27:28 -04:00
parent a52868a55c
commit 6e2c6c9def

View file

@ -210,7 +210,7 @@ random_device::entropy() const noexcept
return std::numeric_limits<result_type>::digits;
return ent;
#elif defined(__OpenBSD__) || defined(_LIBCPP_USING_FUCHSIA_CPRNG)
#elif defined(_LIBCPP_USING_ARC4_RANDOM) || defined(_LIBCPP_USING_FUCHSIA_CPRNG)
return std::numeric_limits<result_type>::digits;
#else
return 0;