From a5f91a335b622cccea2dbee9e0a6028880c6a79d Mon Sep 17 00:00:00 2001 From: divinity76 Date: Fri, 22 Dec 2023 12:56:55 +0100 Subject: [PATCH] missing header for strcasecmp Posix specifications say you need strings.h to use strcasecmp - it happens to work on most Linux systems without it, but that's basically just a compiler include bug (i think?) - Cygwin gcc actually requires string.h, compiling on Cygwin is how I noticed strings.h was missing --- examples/server/httplib.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/server/httplib.h b/examples/server/httplib.h index 28746000c..5db3acdad 100644 --- a/examples/server/httplib.h +++ b/examples/server/httplib.h @@ -192,6 +192,11 @@ using socket_t = SOCKET; #include #include +#if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L +#include +#endif + + using socket_t = int; #ifndef INVALID_SOCKET #define INVALID_SOCKET (-1)