nghttp: Fix compile error and warning with libc++
This commit is contained in:
parent
4ee89e62fc
commit
fa4f03525e
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue