提交 4c181f08 编写于 作者: I Igor Canadi

Fix compile on darwin

Summary: As title

Test Plan: make check

Reviewers: anthony

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D39243
上级 bc7a7a40
......@@ -3609,7 +3609,8 @@ class Benchmark {
if (total != prev_total) {
fprintf(stderr,
"RandomTransactionVerify found inconsistent totals. "
"Set[%u]: %lu, Set[%u]: %lu \n",
"Set[%" PRIu32 "]: %" PRIu64 ", Set[%" PRIu32 "]: %" PRIu64
" \n",
i - 1, prev_total, i, total);
abort();
}
......@@ -3617,7 +3618,8 @@ class Benchmark {
prev_total = total;
}
fprintf(stdout, "RandomTransactionVerify Success! Total:%lu\n", prev_total);
fprintf(stdout, "RandomTransactionVerify Success! Total:%" PRIu64 "\n",
prev_total);
}
void Compact(ThreadState* thread) {
......
......@@ -7,6 +7,11 @@
#include "utilities/transactions/optimistic_transaction_impl.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h>
#include <string>
#include <vector>
......@@ -304,9 +309,9 @@ Status OptimisticTransactionImpl::CheckTransactionForConflicts(DB* db) {
char msg[255];
snprintf(
msg, sizeof(msg),
"Could not commit transaction with write at SequenceNumber %lu "
"as the MemTable only contains changes newer than SequenceNumber "
"%lu.",
"Could not commit transaction with write at SequenceNumber %" PRIu64
" as the MemTable only contains changes newer than SequenceNumber "
"%" PRIu64 ".",
key_seq, earliest_seq);
result = Status::Busy(msg);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册