diff --git a/utilities/persistent_cache/hash_table.h b/utilities/persistent_cache/hash_table.h index 811d7bb33..54df48c07 100644 --- a/utilities/persistent_cache/hash_table.h +++ b/utilities/persistent_cache/hash_table.h @@ -5,6 +5,8 @@ // #pragma once +#ifndef ROCKSDB_LITE + #include #include #include @@ -224,3 +226,5 @@ class HashTable { }; } // namespace rocksdb + +#endif diff --git a/utilities/persistent_cache/hash_table_bench.cc b/utilities/persistent_cache/hash_table_bench.cc index 13ee93e8c..957af4b71 100644 --- a/utilities/persistent_cache/hash_table_bench.cc +++ b/utilities/persistent_cache/hash_table_bench.cc @@ -4,6 +4,8 @@ // of patent rights can be found in the PATENTS file in the same directory. // +#ifndef ROCKSDB_LITE + #include #include #include @@ -292,3 +294,6 @@ int main(int argc, char** argv) { return 0; } +#else +int main(int /*argc*/, char** /*argv*/) { return 0; } +#endif diff --git a/utilities/persistent_cache/hash_table_evictable.h b/utilities/persistent_cache/hash_table_evictable.h index 6545ac6a4..98f44a19f 100644 --- a/utilities/persistent_cache/hash_table_evictable.h +++ b/utilities/persistent_cache/hash_table_evictable.h @@ -5,6 +5,8 @@ // #pragma once +#ifndef ROCKSDB_LITE + #include "utilities/persistent_cache/hash_table.h" #include "utilities/persistent_cache/lrulist.h" @@ -158,3 +160,5 @@ class EvictableHashTable : private HashTable { }; } // namespace rocksdb + +#endif diff --git a/utilities/persistent_cache/hash_table_test.cc b/utilities/persistent_cache/hash_table_test.cc index 0d12a3396..e05460faf 100644 --- a/utilities/persistent_cache/hash_table_test.cc +++ b/utilities/persistent_cache/hash_table_test.cc @@ -13,6 +13,8 @@ #include "utilities/persistent_cache/hash_table.h" #include "utilities/persistent_cache/hash_table_evictable.h" +#ifndef ROCKSDB_LITE + namespace rocksdb { struct HashTableTest : public testing::Test { @@ -145,6 +147,7 @@ TEST_F(EvictableHashTableTest, TestEvict) { } } // namespace rocksdb +#endif int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/utilities/persistent_cache/lrulist.h b/utilities/persistent_cache/lrulist.h index c3e14be1d..6aae1dd36 100644 --- a/utilities/persistent_cache/lrulist.h +++ b/utilities/persistent_cache/lrulist.h @@ -5,6 +5,8 @@ // #pragma once +#ifndef ROCKSDB_LITE + #include #include "util/mutexlock.h" @@ -168,3 +170,5 @@ class LRUList { }; } // namespace rocksdb + +#endif