From b133328f9681b159300515b1bd6b32cf0d5d819c Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 6 Nov 2016 10:34:22 +0100 Subject: [PATCH] write_riemann plugin: Fix order of includes. The previous version failed on Solaris with: In file included from ./daemon/collectd.h:31:0, from write_riemann.c:36: ./config.h:1619:0: error: "_FILE_OFFSET_BITS" redefined [-Werror] #define _FILE_OFFSET_BITS 64 ^ --- src/write_riemann.c | 16 +++++++--------- src/write_riemann_threshold.c | 7 +++---- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/write_riemann.c b/src/write_riemann.c index 58611a96..a6effa34 100644 --- a/src/write_riemann.c +++ b/src/write_riemann.c @@ -26,14 +26,8 @@ * Florian octo Forster */ -#include -#include -#include -#include -#include -#include - #include "collectd.h" + #include "plugin.h" #include "common.h" #include "configfile.h" @@ -41,10 +35,14 @@ #include "riemann.pb-c.h" #include "write_riemann_threshold.h" +#include +#include +#include + #define RIEMANN_HOST "localhost" #define RIEMANN_PORT "5555" -#define RIEMANN_TTL_FACTOR 2.0 -#define RIEMANN_BATCH_MAX 8192 +#define RIEMANN_TTL_FACTOR 2.0 +#define RIEMANN_BATCH_MAX 8192 struct riemann_host { char *name; diff --git a/src/write_riemann_threshold.c b/src/write_riemann_threshold.c index b1f7297e..40093663 100644 --- a/src/write_riemann_threshold.c +++ b/src/write_riemann_threshold.c @@ -25,11 +25,8 @@ * Andrés J. Díaz **/ -#include -#include -#include - #include "collectd.h" + #include "common.h" #include "plugin.h" #include "utils_avltree.h" @@ -37,6 +34,8 @@ #include "utils_threshold.h" #include "write_riemann_threshold.h" +#include + /* * Threshold management * ==================== -- 2.11.0