From 27cd4e6ffeca2c9978ec1df7de3d22b9303a71b4 Mon Sep 17 00:00:00 2001 From: Andreas Kempf Date: Fri, 14 Oct 2022 16:49:48 +0200 Subject: [PATCH] Support compilation on AIX (#1402) Disable the ifaddrs.h include statement and the USE_IF2IP flag on AIX. AIX is a Unix OS but does not offer the ifaddrs.h header. --- httplib.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index d380af0..12c7b85 100644 --- a/httplib.h +++ b/httplib.h @@ -172,7 +172,9 @@ using socket_t = SOCKET; #else // not _WIN32 #include +#ifndef _AIX #include +#endif #include #include #include @@ -2720,7 +2722,7 @@ inline bool bind_ip_address(socket_t sock, const std::string &host) { return ret; } -#if !defined _WIN32 && !defined ANDROID +#if !defined _WIN32 && !defined ANDROID && !defined _AIX #define USE_IF2IP #endif