1From 1ccdb7513a7a0f24b8ce3b6766e52e690874bc64 Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Tue, 17 Oct 2023 19:08:12 -0700 4Subject: [PATCH] Fix printing 64-bit integer types 5 6Upstream-Status: Pending 7Signed-off-by: Khem Raj <raj.khem@gmail.com> 8--- 9 db/db_impl.cc | 5 +++-- 10 db/version_edit.h | 1 + 11 2 files changed, 4 insertions(+), 2 deletions(-) 12 13--- a/db/db_impl.cc 14+++ b/db/db_impl.cc 15@@ -5,6 +5,7 @@ 16 #include "db/db_impl.h" 17 18 #include <algorithm> 19+#include <cinttypes> 20 #include <atomic> 21 #include <cstdint> 22 #include <cstdio> 23@@ -520,8 +521,8 @@ Status DBImpl::WriteLevel0Table(MemTable 24 mutex_.Lock(); 25 } 26 27- Log(options_.info_log, "Level-0 table #%llu: %lld bytes %s", 28- (unsigned long long)meta.number, (unsigned long long)meta.file_size, 29+ Log(options_.info_log, "Level-0 table #%" PRIu64 " : %" PRIu64 " bytes %s", 30+ meta.number, meta.file_size, 31 s.ToString().c_str()); 32 delete iter; 33 pending_outputs_.erase(meta.number); 34--- a/db/version_edit.h 35+++ b/db/version_edit.h 36@@ -5,6 +5,7 @@ 37 #ifndef STORAGE_LEVELDB_DB_VERSION_EDIT_H_ 38 #define STORAGE_LEVELDB_DB_VERSION_EDIT_H_ 39 40+#include <cstdint> 41 #include <set> 42 #include <utility> 43 #include <vector> 44