Skip to content

Commit

Permalink
Merge pull request #928 from leleliu008/fix-undeclared-pread-function
Browse files Browse the repository at this point in the history
pread64(3) is Linux-specific and not declared on other platforms
  • Loading branch information
kelson42 authored Aug 30, 2024
2 parents 398a3c2 + 0a02b95 commit 3130784
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fs_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ namespace unix {

zsize_t FD::readAt(char* dest, zsize_t size, offset_t offset) const
{
#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__HAIKU__)
# define PREAD pread
#else
#if defined(__linux__)
# define PREAD pread64
#else
# define PREAD pread
#endif
ssize_t full_size_read = 0;
auto size_to_read = size.v;
Expand Down

0 comments on commit 3130784

Please sign in to comment.