Skip to content

Commit 4f33637

Browse files
authored
Add support for zOS (#1581)
Signed-off-by: v1gnesh <[email protected]>
1 parent 698a1e5 commit 4f33637

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

httplib.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,15 @@ using socket_t = SOCKET;
172172
#else // not _WIN32
173173

174174
#include <arpa/inet.h>
175-
#ifndef _AIX
175+
#if !defined(_AIX) && !defined(__MVS__)
176176
#include <ifaddrs.h>
177177
#endif
178+
#ifdef __MVS__
179+
#include <strings.h>
180+
#ifndef NI_MAXHOST
181+
#define NI_MAXHOST 1025
182+
#endif
183+
#endif
178184
#include <net/if.h>
179185
#include <netdb.h>
180186
#include <netinet/in.h>
@@ -2805,7 +2811,7 @@ inline bool bind_ip_address(socket_t sock, const std::string &host) {
28052811
return ret;
28062812
}
28072813

2808-
#if !defined _WIN32 && !defined ANDROID && !defined _AIX
2814+
#if !defined _WIN32 && !defined ANDROID && !defined _AIX && !defined __MVS__
28092815
#define USE_IF2IP
28102816
#endif
28112817

0 commit comments

Comments
 (0)