From c572f404273814ab51cc2590cbd33f7ae2c51c39 Mon Sep 17 00:00:00 2001 From: trustchk Date: Thu, 2 Nov 2017 15:03:21 +0000 Subject: [PATCH] libcollectdclient: add defines for AIX This adds two defines that are missing on AIX because they don't have the endian.h header file. AIX is always big endian, so no further check is required for that. As I have no access to IBMs XLC compiler, this patch limits the definitions to GNU GCC. --- src/libcollectdclient/network_parse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c index 67034116..d158b937 100644 --- a/src/libcollectdclient/network_parse.c +++ b/src/libcollectdclient/network_parse.c @@ -43,6 +43,10 @@ #include #elif HAVE_SYS_ENDIAN_H #include +#elif defined(_AIX) && defined(__GNUC__) +/* AIX is always big endian */ +#define be16toh(x) (x) +#define be64toh(x) (x) #endif #if HAVE_GCRYPT_H -- 2.30.2