--- lib/isc/unix/interfaceiter.c.org	2020-10-16 08:41:36 +0000
+++ lib/isc/unix/interfaceiter.c	2020-10-16 08:42:40 +0000
@@ -18,7 +18,38 @@
 #endif			/* ifdef HAVE_SYS_SOCKIO_H */
 
 #include <errno.h>
-#include <ifaddrs.h>
+#ifndef GENERIC_AIX_IFADDRS_H
+#define GENERIC_AIX_IFADDRS_H
+
+#include <sys/socket.h>
+#include <net/if.h>
+
+#undef  ifa_dstaddr
+#undef  ifa_broadaddr
+#define ifa_broadaddr ifa_dstaddr
+
+struct ifaddrs {
+  struct ifaddrs  *ifa_next;
+  char            *ifa_name;
+  unsigned int     ifa_flags;
+  struct sockaddr *ifa_addr;
+  struct sockaddr *ifa_netmask;
+  struct sockaddr *ifa_dstaddr;
+};
+
+extern int getifaddrs(struct ifaddrs **);
+extern void freeifaddrs(struct ifaddrs *);
+
+#endif
+
+
+#include <string.h>
+#include <sys/ioctl.h>
+
+
+#define MAX(x,y) ((x)>(y)?(x):(y))
+#define SIZE(p) MAX((p).sa_len,sizeof(p))
+
 #include <inttypes.h>
 #include <stdbool.h>
 #include <stdio.h>
