From ebb823f746777dff104e44761306ff92810a2430 Mon Sep 17 00:00:00 2001 From: Sagar Vemuri Date: Mon, 14 May 2018 11:01:41 -0700 Subject: [PATCH] Fix db_stress build on mac Summary: I noticed, while debugging an unrelated issue, that db_stress is failing to build on mac, leading to a failed `make all`. ``` $ make db_stress -j4 ... tools/db_stress.cc:862:69: error: cannot initialize a parameter of type 'uint64_t *' (aka 'unsigned long long *') with an rvalue of type 'size_t *' (aka 'unsigned long *') status = FLAGS_env->GetFileSize(FLAGS_expected_values_path, &size); ^~~~~ ./include/rocksdb/env.h:277:66: note: passing argument to parameter 'file_size' here virtual Status GetFileSize(const std::string& fname, uint64_t* file_size) = 0; ^ 1 error generated. make: *** [tools/db_stress.o] Error 1 make: *** Waiting for unfinished jobs.... ``` Closes https://github.com/facebook/rocksdb/pull/3839 Differential Revision: D7979236 Pulled By: sagar0 fbshipit-source-id: 0615e7bb5405bade71e4203803bf723720422d62 --- tools/db_stress.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/db_stress.cc b/tools/db_stress.cc index f291934ba..0b490746c 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -857,7 +857,7 @@ class SharedState { "Cannot use --expected_values_path on when " "--clear_column_family_one_in is greater than zero."); } - size_t size = 0; + uint64_t size = 0; if (status.ok()) { status = FLAGS_env->GetFileSize(FLAGS_expected_values_path, &size); }