mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 07:30:54 +00:00
Fix compile on darwin
Summary: We need to start doing some CI on Macs. Test Plan: works now Reviewers: yhchiang Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D39489
This commit is contained in:
parent
3af668ed17
commit
2d0b9e5f0a
|
@ -7,6 +7,11 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
||||
|
||||
#ifndef __STDC_FORMAT_MACROS
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <mutex>
|
||||
|
@ -75,7 +80,7 @@ std::string Key(uint64_t key, int length) {
|
|||
if (length > kBufSize) {
|
||||
length = kBufSize;
|
||||
}
|
||||
snprintf(buf, kBufSize, "%0*lu", length, key);
|
||||
snprintf(buf, kBufSize, "%0*" PRIu64, length, key);
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue