[RocksDB] posix_logger does not compile on non-linux platform

Summary: As title. Found out this when testing stack_trace.cc portability.

Test Plan: make check; manual test 'non-linux' build by forcing OS_LINUX2

Reviewers: dhruba, heyongqiang

Reviewed By: dhruba

CC: leveldb

Differential Revision: https://reviews.facebook.net/D10263
This commit is contained in:
Haobo Xu 2013-04-15 17:30:43 -07:00
parent 7c6c3c0ff4
commit a29fc171a6

View File

@ -94,12 +94,12 @@ class PosixLogger : public Logger {
}
assert(p <= limit);
const size_t write_size = p - base;
#ifdef OS_LINUX
// If this write would cross a boundary of kDebugLogChunkSize
// space, pre-allocate more space to avoid overly large
// allocations from filesystem allocsize options.
const size_t write_size = p - base;
const int last_allocation_chunk =
((kDebugLogChunkSize - 1 + log_size_) / kDebugLogChunkSize);
const int desired_allocation_chunk =