Skip to content

Commit ed85de6

Browse files
committed
[libcxx] random_device, use arc4random() on Solaris
Reviewed By: ldionne Differential Revision: https://reviews.llvm.org/D125068
1 parent 1dda6ad commit ed85de6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libcxx/docs/ReleaseNotes.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ ABI Changes
104104
``_LIBCPP_ABI_USE_CXX03_NULLPTR_EMULATION`` will not be honoured anymore and there
105105
will be no way to opt back into the C++03 emulation of ``std::nullptr_t``.
106106

107-
- On FreeBSD, NetBSD and DragonFlyBSD, ``std::random_device`` is now implemented on top of
108-
``arc4random()`` instead of reading from ``/dev/urandom``. Any implementation-defined
107+
- On FreeBSD, NetBSD, DragonFlyBSD and Solaris, ``std::random_device`` is now implemented on
108+
top of ``arc4random()`` instead of reading from ``/dev/urandom``. Any implementation-defined
109109
token used when constructing a ``std::random_device`` will now be ignored instead of
110110
interpreted as a file to read entropy from.
111111

libcxx/include/__config

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
// When this option is used, the token passed to `std::random_device`'s
352352
// constructor *must* be "/dev/urandom" -- anything else is an error.
353353
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
354-
defined(__OpenBSD__) || defined(__DragonFly__)
354+
defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun__)
355355
# define _LIBCPP_USING_ARC4_RANDOM
356356
#elif defined(__wasi__)
357357
# define _LIBCPP_USING_GETENTROPY

0 commit comments

Comments
 (0)