mirror of https://gitee.com/bigwinds/arangodb
Fixing linux build
This commit is contained in:
parent
529cb4ae85
commit
45fca509a8
|
@ -272,7 +272,7 @@ public:
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
size_t newMappedSize = sizeof(T) * newSize;
|
size_t newMappedSize = sizeof(T) * newSize;
|
||||||
this->_ptr = mremap(this->_ptr, _mappedSize, newMappedSize, MREMAP_MAYMOVE);
|
this->_ptr = (T*) mremap((void*)this->_ptr, _mappedSize, newMappedSize, MREMAP_MAYMOVE);
|
||||||
if (this->_ptr != MAP_FAILED) {// success
|
if (this->_ptr != MAP_FAILED) {// success
|
||||||
TRI_ASSERT(this->_ptr != nullptr);
|
TRI_ASSERT(this->_ptr != nullptr);
|
||||||
_mappedSize = newMappedSize;
|
_mappedSize = newMappedSize;
|
||||||
|
@ -287,7 +287,7 @@ public:
|
||||||
|
|
||||||
// preserve errno value while we're logging
|
// preserve errno value while we're logging
|
||||||
int tmp = errno;
|
int tmp = errno;
|
||||||
LOG_TOPIC(WARN, Logger::MMAP) << "memory-mapping failed for range " << Logger::RANGE(*result, numOfBytesToInitialize) << ", file-descriptor " << fileDescriptor << ", flags: " << flagify(flags);
|
LOG_TOPIC(WARN, Logger::MMAP) << "memory-mapping failed";
|
||||||
errno = tmp;
|
errno = tmp;
|
||||||
THROW_ARANGO_EXCEPTION(TRI_ERROR_SYS_ERROR);
|
THROW_ARANGO_EXCEPTION(TRI_ERROR_SYS_ERROR);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue