diff options
author | Mark de Wever <koraq@xs4all.nl> | 2024-04-09 19:13:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-09 19:13:02 +0200 |
commit | cf6feff56b06b9110095ba6e20c609c9d1dfcfd3 (patch) | |
tree | ae942165ac0179e34048d77664ebdd22768e82de /libcxx/src | |
parent | eea3bd3954e3a38ae0997f1af558b9deea301c3a (diff) | |
download | llvm-cf6feff56b06b9110095ba6e20c609c9d1dfcfd3.zip llvm-cf6feff56b06b9110095ba6e20c609c9d1dfcfd3.tar.gz llvm-cf6feff56b06b9110095ba6e20c609c9d1dfcfd3.tar.bz2 |
[libc++] Avoids using ENODATA. (#86165)
This macro is deprecated in C++26.
Fixes https://github.com/llvm/llvm-project/issues/81360
---------
Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
Diffstat (limited to 'libcxx/src')
-rw-r--r-- | libcxx/src/random.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libcxx/src/random.cpp b/libcxx/src/random.cpp index 93590af..14c6f44 100644 --- a/libcxx/src/random.cpp +++ b/libcxx/src/random.cpp @@ -79,10 +79,8 @@ unsigned random_device::operator()() { char* p = reinterpret_cast<char*>(&r); while (n > 0) { ssize_t s = read(__f_, p, n); - _LIBCPP_SUPPRESS_DEPRECATED_PUSH if (s == 0) - __throw_system_error(ENODATA, "random_device got EOF"); // TODO ENODATA -> ENOMSG - _LIBCPP_SUPPRESS_DEPRECATED_POP + __throw_system_error(ENOMSG, "random_device got EOF"); if (s == -1) { if (errno != EINTR) __throw_system_error(errno, "random_device got an unexpected error"); |