diff --git a/src/file_reader.cpp b/src/file_reader.cpp index 74cbc3a32..cfabe335f 100644 --- a/src/file_reader.cpp +++ b/src/file_reader.cpp @@ -134,7 +134,7 @@ class MMapException : std::exception {}; char* mmapReadOnly(int fd, offset_type offset, size_type size) { -#if defined(__APPLE__) || defined(__OpenBSD__) +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__HAIKU__) const auto MAP_FLAGS = MAP_PRIVATE; #elif defined(__FreeBSD__) const auto MAP_FLAGS = MAP_PRIVATE|MAP_PREFAULT_READ; diff --git a/src/fs_unix.cpp b/src/fs_unix.cpp index e5f404f19..6ac076750 100644 --- a/src/fs_unix.cpp +++ b/src/fs_unix.cpp @@ -37,7 +37,7 @@ namespace unix { zsize_t FD::readAt(char* dest, zsize_t size, offset_t offset) const { -#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__HAIKU__) # define PREAD pread #else # define PREAD pread64