From: trustchk Date: Thu, 2 Nov 2017 15:03:21 +0000 (+0000) Subject: libcollectdclient: add defines for AIX X-Git-Tag: collectd-5.8.0~13^2~1 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=c572f404273814ab51cc2590cbd33f7ae2c51c39;p=collectd.git 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. --- 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