Skip to content

Commit

Permalink
[fix](build) Fix format specifier causing compilation errors on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
zy-kkk committed Dec 23, 2024
1 parent a032ece commit c0daaaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion be/src/http/http_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <event2/bufferevent.h>
#include <event2/http.h>
#include <event2/http_struct.h>
#include <inttypes.h>

#include <sstream>
#include <string>
Expand Down Expand Up @@ -123,7 +124,7 @@ void HttpChannel::send_files(HttpRequest* request, const std::string& root_dir,
VLOG_DEBUG << "http channel send file " << file_path << ", size: " << file_size;

evbuffer_add_printf(evb.get(), "File-Name: %s\r\n", file.c_str());
evbuffer_add_printf(evb.get(), "Content-Length: %ld\r\n", file_size);
evbuffer_add_printf(evb.get(), "Content-Length: %" PRId64 "\r\n", file_size);
evbuffer_add_printf(evb.get(), "\r\n");
if (file_size > 0) {
evbuffer_add_file(evb.get(), fd, 0, file_size);
Expand Down

0 comments on commit c0daaaf

Please sign in to comment.