Fix Windows Build
Summary: Fix two Windows build problems. Test Plan: Build on Windows and run all Linux tests. Reviewers: IslamAbdelRahman Reviewed By: IslamAbdelRahman Subscribers: leveldb, andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D63189
This commit is contained in:
parent
22696b0881
commit
f7669b40ba
@ -49,8 +49,11 @@ class BlockReadAmpBitmap {
|
||||
}
|
||||
|
||||
// num_bits_needed = ceil(block_size / bytes_per_bit)
|
||||
size_t num_bits_needed = (block_size >> bytes_per_bit_pow_) +
|
||||
(block_size % (1 << bytes_per_bit_pow_) != 0);
|
||||
size_t num_bits_needed =
|
||||
(block_size >> static_cast<size_t>(bytes_per_bit_pow_)) +
|
||||
(block_size % (static_cast<size_t>(1)
|
||||
<< static_cast<size_t>(bytes_per_bit_pow_)) !=
|
||||
0);
|
||||
|
||||
// bitmap_size = ceil(num_bits_needed / kBitsPerEntry)
|
||||
size_t bitmap_size = (num_bits_needed / kBitsPerEntry) +
|
||||
|
@ -38,7 +38,7 @@ namespace {
|
||||
|
||||
struct Lock {
|
||||
std::unique_lock<std::mutex> ul_;
|
||||
explicit Lock(const std::mutex& m) : ul_(m, std::defer_lock) {}
|
||||
explicit Lock(std::mutex& m) : ul_(m, std::defer_lock) {}
|
||||
};
|
||||
|
||||
using Condition = std::condition_variable;
|
||||
|
Loading…
Reference in New Issue
Block a user