Skip to content

Commit

Permalink
Fix OSX build
Browse files Browse the repository at this point in the history
  • Loading branch information
brbzull0 committed Nov 20, 2024
1 parent d3cf33d commit 6fc5549
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/proxy/logging/Log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ Log::flush_thread_main(void * /* args ATS_UNUSED */)
// make sure we're open & ready to write
logfile->check_fd();
if (!logfile->is_open()) {
SiteThrottledWarning("File:%s was closed, have dropped (%" PRId64 ") bytes.", logfile->get_name(), total_bytes);
SiteThrottledWarning("File:%s was closed, have dropped (%ld) bytes.", logfile->get_name(), total_bytes);

Metrics::Counter::increment(log_rsb.bytes_lost_before_written_to_disk, total_bytes);
delete fdata;
Expand All @@ -1364,8 +1364,8 @@ Log::flush_thread_main(void * /* args ATS_UNUSED */)
//
while (total_bytes - bytes_written) {
if (Log::config->logging_space_exhausted) {
Dbg(dbg_ctl_log, "logging space exhausted, failed to write file:%s, have dropped (%" PRId64 ") bytes.",
logfile->get_name(), (total_bytes - bytes_written));
Dbg(dbg_ctl_log, "logging space exhausted, failed to write file:%s, have dropped (%ld) bytes.", logfile->get_name(),
(total_bytes - bytes_written));

Metrics::Counter::increment(log_rsb.bytes_lost_before_written_to_disk, total_bytes - bytes_written);
break;
Expand All @@ -1374,7 +1374,7 @@ Log::flush_thread_main(void * /* args ATS_UNUSED */)
len = ::write(logfilefd, &buf[bytes_written], total_bytes - bytes_written);

if (len < 0) {
SiteThrottledError("Failed to write log to %s: [tried %" PRId64 ", wrote %" PRId64 ", %s]", logfile->get_name(),
SiteThrottledError("Failed to write log to %s: [tried %ld, wrote %ld, %s]", logfile->get_name(),
total_bytes - bytes_written, bytes_written, strerror(errno));

Metrics::Counter::increment(log_rsb.bytes_lost_before_written_to_disk, total_bytes - bytes_written);
Expand Down
2 changes: 1 addition & 1 deletion src/tscore/MatcherUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ readIntoBuffer(const char *file_path, const char *module_name, int *read_size_pt
// Didn't get the whole file, drop everything. We don't want to return
// something partially read because, ie. with configs, the behaviour
// is undefined.
Error("%s Only able to read %" PRId64 " bytes out %" PRId64 " for %s file", module_name, read_size, file_size, file_path);
Error("%s Only able to read %ld bytes out %ld for %s file", module_name, read_size, file_size, file_path);
ats_free(file_buf);
file_buf = nullptr;
}
Expand Down

0 comments on commit 6fc5549

Please sign in to comment.