Commit fa4f0352 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp: Fix compile error and warning with libc++

parent 4ee89e62
......@@ -1057,6 +1057,7 @@ struct HttpClient {
auto& req_stat = req->stat;
auto request_time = (i == 0) ? stat.started_system_time :
stat.started_system_time +
std::chrono::duration_cast<std::chrono::system_clock::duration>
(req_stat.on_request_time - stat.on_started_time);
auto wait_delta = std::chrono::duration_cast
......
......@@ -729,7 +729,8 @@ std::string format_iso8601(const std::chrono::system_clock::time_point& tp)
char buf[128];
auto nwrite = strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S", &tms);
snprintf(&buf[nwrite], sizeof(buf) - nwrite, ".%03ldZ", t.count() % 1000);
snprintf(&buf[nwrite], sizeof(buf) - nwrite, ".%03dZ",
static_cast<int>(t.count() % 1000));
return buf;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment