From ee6b35e55a9236166418c5758d2186c718289210 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Mon, 14 Jul 2014 09:56:52 -0400 Subject: [PATCH] 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 --- db/internal_stats.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/db/internal_stats.cc b/db/internal_stats.cc index 6a942c270..26929034c 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -7,10 +7,13 @@ // found in the LICENSE file. See the AUTHORS file for names of contributors. #include "db/internal_stats.h" -#include "db/column_family.h" +#define __STDC_FORMAT_MACROS +#include #include +#include "db/column_family.h" + namespace rocksdb { namespace { @@ -61,7 +64,7 @@ void PrintLevelStats(char* buf, size_t len, const std::string& name, "%9d " /* Comp(cnt) */ "%8.3f " /* Avg(sec) */ "%10.2f " /* Sta(sec) */ - "%10lu " /* Sta(cnt) */ + "%10" PRIu64 " " /* Sta(cnt) */ "%7.2f\n" /* Avg(ms) */, name.c_str(), num_files, total_file_size / kMB, score, bytes_read / kGB,