diff --git a/util/io_posix.cc b/util/io_posix.cc index 8f3760b80..f46efc902 100644 --- a/util/io_posix.cc +++ b/util/io_posix.cc @@ -768,6 +768,7 @@ Status PosixWritableFile::Allocate(uint64_t offset, uint64_t len) { } #endif +#ifdef OS_LINUX Status PosixWritableFile::RangeSync(uint64_t offset, uint64_t nbytes) { assert(offset <= std::numeric_limits::max()); assert(nbytes <= std::numeric_limits::max()); @@ -782,6 +783,7 @@ Status PosixWritableFile::RangeSync(uint64_t offset, uint64_t nbytes) { size_t PosixWritableFile::GetUniqueId(char* id, size_t max_size) const { return PosixHelper::GetUniqueIdFromFile(fd_, id, max_size); } +#endif /* * PosixRandomRWFile diff --git a/util/io_posix.h b/util/io_posix.h index f77808adc..40f558a19 100644 --- a/util/io_posix.h +++ b/util/io_posix.h @@ -114,8 +114,10 @@ class PosixWritableFile : public WritableFile { #ifdef ROCKSDB_FALLOCATE_PRESENT virtual Status Allocate(uint64_t offset, uint64_t len) override; #endif +#ifdef OS_LINUX virtual Status RangeSync(uint64_t offset, uint64_t nbytes) override; virtual size_t GetUniqueId(char* id, size_t max_size) const override; +#endif }; // mmap() based random-access