提交 a29fc171 编写于 作者: H Haobo Xu

[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
上级 7c6c3c0f
...@@ -94,12 +94,12 @@ class PosixLogger : public Logger { ...@@ -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 =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册