Fix compile on darwin

Summary: As title

Test Plan: make check

Reviewers: anthony

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D39243
This commit is contained in:
Igor Canadi 2015-05-30 12:25:45 -04:00
parent bc7a7a400c
commit 4c181f08bc
2 changed files with 12 additions and 5 deletions

View File

@ -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) {

View File

@ -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 {