diff --git a/src/io/FileDescriptor.hxx b/src/io/FileDescriptor.hxx index a77488a4d..e31217e9a 100644 --- a/src/io/FileDescriptor.hxx +++ b/src/io/FileDescriptor.hxx @@ -236,9 +236,8 @@ public: #ifndef _WIN32 [[nodiscard]] - ssize_t ReadAt(off_t offset, - void *buffer, std::size_t length) const noexcept { - return ::pread(fd, buffer, length, offset); + ssize_t ReadAt(off_t offset, std::span dest) const noexcept { + return ::pread(fd, dest.data(), dest.size(), offset); } #endif