rocksdb/utilities/persistent_cache
Guo Xiao aa6509d8e4 Fix build for linux
Summary:
* Include `unistd.h` for `sleep(3)`
* Include `sys/time.h` for `gettimeofday(3)`
* Include `utils/random.h` for `Random64`

Error messages:

utilities/persistent_cache/hash_table_bench.cc: In constructor ‘rocksdb::HashTableBenchmark::HashTableBenchmark(rocksdb::HashTableImpl<long unsigned int, std::__cxx11::basic_string<char> >*, size_t, size_t, size_t, size_t)’:
utilities/persistent_cache/hash_table_bench.cc:76:28: error: ‘sleep’ was not declared in this scope
       /* sleep override */ sleep(1);
                            ^~~~~
utilities/persistent_cache/hash_table_bench.cc:76:28: note: suggested alternative: ‘strsep’
       /* sleep override */ sleep(1);
                            ^~~~~
                            strsep
utilities/persistent_cache/hash_table_bench.cc: In member function ‘void rocksdb::HashTableBenchmark::RunRead()’:
utilities/persistent_cache/hash_table_bench.cc:107:5: error: ‘Random64’ was not declared in this scope
     Random64 rgen(time(nullptr));
     ^~~~~~~~
utilities/persistent_cache/hash_table_bench.cc:107:5: note: suggested alternative: ‘random_r’
     Random64 rgen(time(nullptr));
     ^~~~~~~~
     random_r
utilities/persistent_cache/hash_table_bench.cc:110:18: error: ‘rgen’ was not declared in this scope
       size_t k = rgen.Next() % max_prepop_key;
                  ^~~~
utilities/persistent_cache/hash_table_bench.cc: In static member function ‘static uint64_t rocksdb::HashTableBenchmark::NowInMillSec()’:
utilities/persistent_cache/hash_table_bench.cc:153:5: error: ‘gettimeofday’ was not declared in this scope
     gettimeofday(&tv, /*tz=*/nullptr);
     ^~~~~~~~~~~~
make[2]: *** [CMakeFiles/hash_table_bench.dir/build.make:63: CMakeFiles/hash_table_bench.dir/utilities/persistent_cache/hash_table_bench.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3346: CMakeFiles/hash_table_bench.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Closes https://github.com/facebook/rocksdb/pull/3283

Differential Revision: D6594850

Pulled By: ajkr

fbshipit-source-id: fd83957338c210cdfd253763347aafd39476824f
2017-12-18 12:28:03 -08:00
..
block_cache_tier.cc block_cache_tier: fix gcc-7 warnings 2017-08-10 11:58:53 -07:00
block_cache_tier.h Change RocksDB License 2017-07-15 16:11:23 -07:00
block_cache_tier_file.cc utilities: Fix coverity issues 2017-11-28 13:27:08 -08:00
block_cache_tier_file.h Revert "comment out unused parameters" 2017-07-21 18:26:26 -07:00
block_cache_tier_file_buffer.h Change RocksDB License 2017-07-15 16:11:23 -07:00
block_cache_tier_metadata.cc Fix unused var warnings in Release mode 2017-10-23 14:27:04 -07:00
block_cache_tier_metadata.h Change RocksDB License 2017-07-15 16:11:23 -07:00
hash_table.h Change RocksDB License 2017-07-15 16:11:23 -07:00
hash_table_bench.cc Fix build for linux 2017-12-18 12:28:03 -08:00
hash_table_evictable.h Enable MSVC W4 with a few exceptions. Fix warnings and bugs 2017-10-19 10:57:12 -07:00
hash_table_test.cc Revert "comment out unused parameters" 2017-07-21 18:26:26 -07:00
lrulist.h Change RocksDB License 2017-07-15 16:11:23 -07:00
persistent_cache_bench.cc fix gflags namespace 2017-12-01 10:42:05 -08:00
persistent_cache_test.cc CodeMod: Prefer ADD_FAILURE() over EXPECT_TRUE(false), et cetera 2017-07-16 21:26:02 -07:00
persistent_cache_test.h Revert "comment out unused parameters" 2017-07-21 18:26:26 -07:00
persistent_cache_tier.cc Revert "comment out unused parameters" 2017-07-21 18:26:26 -07:00
persistent_cache_tier.h Change RocksDB License 2017-07-15 16:11:23 -07:00
persistent_cache_util.h Change RocksDB License 2017-07-15 16:11:23 -07:00
volatile_tier_impl.cc Revert "comment out unused parameters" 2017-07-21 18:26:26 -07:00
volatile_tier_impl.h Change RocksDB License 2017-07-15 16:11:23 -07:00