From 4f33637b43cc926a978e08409491d5fc08c5940d Mon Sep 17 00:00:00 2001 From: v1gnesh Date: Tue, 6 Jun 2023 10:44:06 +0530 Subject: [PATCH] Add support for zOS (#1581) Signed-off-by: v1gnesh --- httplib.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/httplib.h b/httplib.h index ae32939..0398253 100644 --- a/httplib.h +++ b/httplib.h @@ -172,9 +172,15 @@ using socket_t = SOCKET; #else // not _WIN32 #include -#ifndef _AIX +#if !defined(_AIX) && !defined(__MVS__) #include #endif +#ifdef __MVS__ +#include +#ifndef NI_MAXHOST +#define NI_MAXHOST 1025 +#endif +#endif #include #include #include @@ -2805,7 +2811,7 @@ inline bool bind_ip_address(socket_t sock, const std::string &host) { return ret; } -#if !defined _WIN32 && !defined ANDROID && !defined _AIX +#if !defined _WIN32 && !defined ANDROID && !defined _AIX && !defined __MVS__ #define USE_IF2IP #endif