Auto-Merge pull request #2792 from rpv-tomsk/fix-5.8
authorcollectd bot <32910397+collectd-bot@users.noreply.github.com>
Wed, 23 May 2018 09:15:47 +0000 (11:15 +0200)
committerGitHub <noreply@github.com>
Wed, 23 May 2018 09:15:47 +0000 (11:15 +0200)
Automatically merged due to "Automerge" label

src/stdendian.h
src/utils_config_cores_test.c

index 2fc569c..9ab0fb5 100644 (file)
 #define __ENDIAN_DEFINED 1
 #endif /* sun */
 
+/* AIX */
+#if defined(_AIX)
+#include <sys/machine.h>
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define _LITTLE_ENDIAN 1234
+#define _BIG_ENDIAN 4321
+#define _BYTE_ORDER _LITTLE_ENDIAN
+#elif BYTE_ORDER == BIG_ENDIAN
+#define _LITTLE_ENDIAN 1234
+#define _BIG_ENDIAN 4321
+#define _BYTE_ORDER _BIG_ENDIAN
+#else
+#error Could not determine CPU byte order for AIX
+#endif
+#define __ENDIAN_DEFINED 1
+#endif /* AIX */
+
 /* Windows */
 #if defined(_WIN32) || defined(_MSC_VER)
 /* assumes all Microsoft targets are little endian */
index 4809bd3..2c6f5b6 100644 (file)
@@ -25,6 +25,8 @@
  *   Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
  **/
 
+#include "collectd.h"
+
 #include "testing.h"
 #include "utils_config_cores.c" /* sic */