Skip to content

Commit 6a1f71e

Browse files
authored
[fix](build) fix macOS build (#58445)
Use PRId64 macro instead of %lld for int64_t to fix compilation
1 parent 3469af8 commit 6a1f71e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

be/src/runtime/stream_load/stream_load_recorder_manager.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <fmt/format.h>
2121
#include <glog/logging.h>
22+
#include <inttypes.h>
2223
#include <rapidjson/document.h>
2324
#include <rapidjson/stringbuffer.h>
2425

@@ -176,9 +177,9 @@ std::string StreamLoadRecorderManager::_parse_and_format_record(const std::strin
176177
struct tm tm_buf;
177178
localtime_r(&ts_sec, &tm_buf);
178179
char buf[64];
179-
snprintf(buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02d.%03ld", tm_buf.tm_year + 1900,
180-
tm_buf.tm_mon + 1, tm_buf.tm_mday, tm_buf.tm_hour, tm_buf.tm_min, tm_buf.tm_sec,
181-
ms_part);
180+
snprintf(buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02d.%03" PRId64,
181+
tm_buf.tm_year + 1900, tm_buf.tm_mon + 1, tm_buf.tm_mday, tm_buf.tm_hour,
182+
tm_buf.tm_min, tm_buf.tm_sec, ms_part);
182183
return {buf};
183184
};
184185

0 commit comments

Comments
 (0)