From 2feea0c9ab86939610cb83e1c9779fb2d48f723d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hoa=20Thi=C3=AAn=20V=C5=A9?= Date: Fri, 24 Apr 2020 23:02:19 +0700 Subject: [PATCH] =?UTF-8?q?Fixed=20error:=20=E2=80=98ULONG=5FMAX=E2=80=99?= =?UTF-8?q?=20was=20not=20declared=20in=20this=20scope=20on=20line=201921?= =?UTF-8?q?=20(#445)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed error: ULONG_MAX is defined in the limits.h header file. Putting #include ``` httplib.h: In function ‘bool httplib::detail::read_content_chunked(httplib::Stream&, httplib::ContentReceiver)’: httplib.h:1921:22: error: ‘ULONG_MAX’ was not declared in this scope if (chunk_len == ULONG_MAX) { return false; } ^~~~~~~~~ httplib.h:1921:22: note: suggested alternative: ‘_SC_ULONG_MAX’ if (chunk_len == ULONG_MAX) { return false; } ^~~~~~~~~ _SC_ULONG_MAX ``` * Move #include to after #include --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index 303d63f..1985123 100644 --- a/httplib.h +++ b/httplib.h @@ -134,6 +134,7 @@ using socket_t = int; #include #include #include +#include #include #include #include @@ -174,7 +175,6 @@ inline const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1) { #ifdef CPPHTTPLIB_ZLIB_SUPPORT #include #endif - /* * Declaration */