From 3d9cc51851e335602783ed65d0fb40d631682acf Mon Sep 17 00:00:00 2001 From: yhirose Date: Thu, 5 Sep 2024 12:01:32 -0400 Subject: [PATCH] Fixed build error on Windows due to `max` macro in windows.h --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index 5d9efb9..d8d9b17 100644 --- a/httplib.h +++ b/httplib.h @@ -2872,7 +2872,7 @@ inline bool mmap::open(const char *path) { // See: // https://github.com/yhirose/cpp-httplib/issues/1903#issuecomment-2316520721 if (static_cast(size.QuadPart) > - std::numeric_limits::max()) { + (std::numeric_limits::max)()) { // `size_t` might be 32-bits, on 32-bits Windows. return false; }