From 462884bebbc40f8ebec312fda2e81070984dea20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C4=B0brahimo=C4=9Flu?= <9880090+oculusdrifts@users.noreply.github.com> Date: Wed, 27 Jul 2022 13:16:06 +0100 Subject: [PATCH] With SSL enabled and NOMINMAX not defined, there is a conflict with 'max', which this fixes (#1334) Co-authored-by: iamttaM <9880090+oculusbytes@users.noreply.github.com> --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index d537f0b..ab8897a 100644 --- a/httplib.h +++ b/httplib.h @@ -7298,7 +7298,7 @@ inline ssize_t SSLSocketStream::read(char *ptr, size_t size) { inline ssize_t SSLSocketStream::write(const char *ptr, size_t size) { if (is_writable()) { auto handle_size = static_cast( - std::min(size, std::numeric_limits::max())); + std::min(size, (std::numeric_limits::max)())); auto ret = SSL_write(ssl_, ptr, static_cast(handle_size)); if (ret < 0) {