File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,10 @@ TODO
117
117
118
118
ABI Affecting Changes
119
119
---------------------
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 ``.
121
124
122
125
123
126
Build System Changes
Original file line number Diff line number Diff line change @@ -79,10 +79,8 @@ unsigned random_device::operator()() {
79
79
char * p = reinterpret_cast <char *>(&r);
80
80
while (n > 0 ) {
81
81
ssize_t s = read (__f_, p, n);
82
- _LIBCPP_SUPPRESS_DEPRECATED_PUSH
83
82
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" );
86
84
if (s == -1 ) {
87
85
if (errno != EINTR)
88
86
__throw_system_error (errno, " random_device got an unexpected error" );
You can’t perform that action at this time.
0 commit comments