File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,10 @@ TODO
117117
118118ABI Affecting Changes
119119---------------------
120- TODO
120+
121+ - The optional POSIX macro ``ENODATA `` has been deprecated in C++ and POSIX 2017. The
122+ ``random_device `` could throw a ``system_error `` with this value. It now
123+ throws ``ENOMSG ``.
121124
122125
123126Build System Changes
Original file line number Diff line number Diff line change @@ -79,10 +79,8 @@ unsigned random_device::operator()() {
7979 char * p = reinterpret_cast <char *>(&r);
8080 while (n > 0 ) {
8181 ssize_t s = read (__f_, p, n);
82- _LIBCPP_SUPPRESS_DEPRECATED_PUSH
8382 if (s == 0 )
84- __throw_system_error (ENODATA, " random_device got EOF" ); // TODO ENODATA -> ENOMSG
85- _LIBCPP_SUPPRESS_DEPRECATED_POP
83+ __throw_system_error (ENOMSG, " random_device got EOF" );
8684 if (s == -1 ) {
8785 if (errno != EINTR)
8886 __throw_system_error (errno, " random_device got an unexpected error" );
You can’t perform that action at this time.
0 commit comments