[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
main
Haobo Xu 12 years ago
parent 7c6c3c0ff4
commit a29fc171a6
  1. 2
      util/posix_logger.h

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

Loading…
Cancel
Save