Skip to content

Commit b69247d

Browse files
brad0tstellar
authored andcommitted
[libcxx] random_device, specify optimal entropy properties for all OS's using arc4random()
Reviewed By: ldionne Differential Revision: https://reviews.llvm.org/D122522 (cherry picked from commit 6e2c6c9)
1 parent 63e7af7 commit b69247d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/src/random.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ random_device::entropy() const noexcept
210210
return std::numeric_limits<result_type>::digits;
211211

212212
return ent;
213-
#elif defined(__OpenBSD__) || defined(_LIBCPP_USING_FUCHSIA_CPRNG)
213+
#elif defined(_LIBCPP_USING_ARC4_RANDOM) || defined(_LIBCPP_USING_FUCHSIA_CPRNG)
214214
return std::numeric_limits<result_type>::digits;
215215
#else
216216
return 0;

0 commit comments

Comments
 (0)