diff --git a/httplib.h b/httplib.h index a2d5f09..23d8fb0 100644 --- a/httplib.h +++ b/httplib.h @@ -3417,7 +3417,7 @@ inline ssize_t SocketStream::read(char *ptr, size_t size) { if (!is_readable()) { return -1; } #ifdef _WIN32 - if (size > static_cast(std::numeric_limits::max())) { + if (size > static_cast((std::numeric_limits::max)())) { return -1; } return recv(sock_, ptr, static_cast(size), 0); @@ -3430,7 +3430,7 @@ inline ssize_t SocketStream::write(const char *ptr, size_t size) { if (!is_writable()) { return -1; } #ifdef _WIN32 - if (size > static_cast(std::numeric_limits::max())) { + if (size > static_cast((std::numeric_limits::max)())) { return -1; } return send(sock_, ptr, static_cast(size), 0);