mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
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.
This commit is contained in:
parent
cae5a8be1c
commit
27cd4e6ffe
1 changed files with 3 additions and 1 deletions
|
@ -172,7 +172,9 @@ using socket_t = SOCKET;
|
|||
#else // not _WIN32
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#ifndef _AIX
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue