Fixed compiler error for old compiler.

This commit is contained in:
yhirose 2020-10-27 12:23:37 -04:00
parent 536e7eb7f2
commit 953600c177

View file

@ -3164,7 +3164,7 @@ get_range_offset_and_length(const Request &req, size_t content_length,
auto slen = static_cast<ssize_t>(content_length);
if (r.first == -1) {
r.first = std::max(static_cast<ssize_t>(0), slen - r.second);
r.first = (std::max)(static_cast<ssize_t>(0), slen - r.second);
r.second = slen - 1;
}