Fix mac compile

Summary: We should use PRIu64 instead of "%lu" for portability

Test Plan: compiles now

Reviewers: ljin, dhruba

Reviewed By: dhruba

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D19809
main
Igor Canadi 11 years ago
parent 46f0f6ddd5
commit ee6b35e55a
  1. 7
      db/internal_stats.cc

@ -7,10 +7,13 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "db/internal_stats.h" #include "db/internal_stats.h"
#include "db/column_family.h"
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <vector> #include <vector>
#include "db/column_family.h"
namespace rocksdb { namespace rocksdb {
namespace { namespace {
@ -61,7 +64,7 @@ void PrintLevelStats(char* buf, size_t len, const std::string& name,
"%9d " /* Comp(cnt) */ "%9d " /* Comp(cnt) */
"%8.3f " /* Avg(sec) */ "%8.3f " /* Avg(sec) */
"%10.2f " /* Sta(sec) */ "%10.2f " /* Sta(sec) */
"%10lu " /* Sta(cnt) */ "%10" PRIu64 " " /* Sta(cnt) */
"%7.2f\n" /* Avg(ms) */, "%7.2f\n" /* Avg(ms) */,
name.c_str(), num_files, total_file_size / kMB, score, name.c_str(), num_files, total_file_size / kMB, score,
bytes_read / kGB, bytes_read / kGB,

Loading…
Cancel
Save