From 952a33f298f14775fae61675b2ff541abf24f63d Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Fri, 5 Jan 2018 16:27:10 +0100 Subject: [PATCH] Make it compile on IBM AIX systems Closes #422 --- fmacros.h | 7 +++++++ net.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fmacros.h b/fmacros.h index d00ccda..4cdbc13 100644 --- a/fmacros.h +++ b/fmacros.h @@ -16,6 +16,8 @@ #define _XOPEN_SOURCE #elif defined(__FreeBSD__) // intentionally left blank, don't define _XOPEN_SOURCE +#elif defined(AIX) +// intentionally left blank, don't define _XOPEN_SOURCE #else #define _XOPEN_SOURCE #endif @@ -28,4 +30,9 @@ #define _OSX #endif +#ifndef AIX +# define _XOPEN_SOURCE_EXTENDED 1 +# define _ALL_SOURCE +#endif + #endif diff --git a/net.h b/net.h index 2f1a0bf..fc8ddd3 100644 --- a/net.h +++ b/net.h @@ -37,7 +37,7 @@ #include "hiredis.h" -#if defined(__sun) +#if defined(__sun) || defined(AIX) #define AF_LOCAL AF_UNIX #endif