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:
Andreas Kempf 2022-10-14 16:49:48 +02:00 committed by GitHub
parent cae5a8be1c
commit 27cd4e6ffe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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