This commit is contained in:
Nikita Vasilev 2020-05-24 21:59:06 +03:00
parent 3150667aa3
commit 797fa400b4
2 changed files with 4 additions and 4 deletions

View File

@ -654,7 +654,7 @@ void SSDCachePartition::getValueFromStorage(const PaddedPODArray<Index> & indice
#endif
}
#if defined(__FreeBSD__)
const char* buf_ptr = reinterpret_cast<UInt64>(request.aio.aio_buf);
const char* buf_ptr = reinterpret_cast<char *>(reinterpret_cast<UInt64>(request.aio.aio_buf));
#else
const auto* buf_ptr = reinterpret_cast<char *>(request.aio_buf);
#endif
@ -736,7 +736,7 @@ void SSDCachePartition::clearOldestBlocks()
}
#if defined(__FreeBSD__)
if (event.aio.res != static_cast<ssize_t>(request.aio.aio_nbytes))
if (event.aio.udata != static_cast<ssize_t>(request.aio.aio_nbytes))
throw Exception("GC: AIO failed to read file " + path + BIN_FILE_EXT + ".", ErrorCodes::AIO_READ_ERROR);
#else
if (event.res != static_cast<ssize_t>(request.aio_nbytes))

View File

@ -689,7 +689,7 @@ void SSDComplexKeyCachePartition::getValueFromStorage(const PaddedPODArray<Index
#endif
}
#if defined(__FreeBSD__)
const char* buf_ptr = reinterpret_cast<UInt64>(request.aio.aio_buf);
const char* buf_ptr = reinterpret_cast<char *>(reinterpret_cast<UInt64>(request.aio.aio_buf));
#else
const auto* buf_ptr = reinterpret_cast<char *>(request.aio_buf);
#endif
@ -772,7 +772,7 @@ void SSDComplexKeyCachePartition::clearOldestBlocks()
}
#if defined(__FreeBSD__)
if (event.aio.res != static_cast<ssize_t>(request.aio.aio_nbytes))
if (event.aio.udata != static_cast<ssize_t>(request.aio.aio_nbytes))
throw Exception("GC: AIO failed to read file " + path + BIN_FILE_EXT + ".", ErrorCodes::AIO_READ_ERROR);
#else
if (event.res != static_cast<ssize_t>(request.aio_nbytes))