diff --git a/CMakeLists.txt b/CMakeLists.txt index 2731a60eff..34f368a2aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1230,9 +1230,8 @@ if(WITH_TESTS) if(ROCKSDB_LIB_FOR_C) set(C_TESTS db/c_test.c) - # C executables must link to a shared object add_executable(c_test db/c_test.c) - target_link_libraries(c_test ${ROCKSDB_SHARED_LIB} testharness) + target_link_libraries(c_test ${ROCKSDB_LIB_FOR_C} testharness) add_test(NAME c_test COMMAND c_test${ARTIFACT_SUFFIX}) add_dependencies(check c_test) endif() diff --git a/db/prefix_test.cc b/db/prefix_test.cc index 81387ce76b..6bd6183510 100644 --- a/db/prefix_test.cc +++ b/db/prefix_test.cc @@ -587,7 +587,7 @@ TEST_F(PrefixTest, DynamicPrefixIterator) { } if (FLAGS_random_prefix) { - std::random_shuffle(prefixes.begin(), prefixes.end()); + RandomShuffle(prefixes.begin(), prefixes.end()); } HistogramImpl hist_put_time; diff --git a/table/cuckoo/cuckoo_table_reader_test.cc b/table/cuckoo/cuckoo_table_reader_test.cc index f53f74fa88..5795de80d3 100644 --- a/table/cuckoo/cuckoo_table_reader_test.cc +++ b/table/cuckoo/cuckoo_table_reader_test.cc @@ -500,7 +500,7 @@ void ReadKeys(uint64_t num, uint32_t batch_size) { for (uint64_t i = 0; i < num; ++i) { keys.push_back(2 * i); } - std::random_shuffle(keys.begin(), keys.end()); + RandomShuffle(keys.begin(), keys.end()); PinnableSlice value; // Assume only the fast path is triggered