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 #endif
} }
#if defined(__FreeBSD__) #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 #else
const auto* buf_ptr = reinterpret_cast<char *>(request.aio_buf); const auto* buf_ptr = reinterpret_cast<char *>(request.aio_buf);
#endif #endif
@ -736,7 +736,7 @@ void SSDCachePartition::clearOldestBlocks()
} }
#if defined(__FreeBSD__) #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); throw Exception("GC: AIO failed to read file " + path + BIN_FILE_EXT + ".", ErrorCodes::AIO_READ_ERROR);
#else #else
if (event.res != static_cast<ssize_t>(request.aio_nbytes)) if (event.res != static_cast<ssize_t>(request.aio_nbytes))

View File

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