write_riemann plugin: Fix order of includes.
authorFlorian Forster <octo@collectd.org>
Sun, 6 Nov 2016 09:34:22 +0000 (10:34 +0100)
committerFlorian Forster <octo@collectd.org>
Sun, 6 Nov 2016 09:50:38 +0000 (10:50 +0100)
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
src/write_riemann_threshold.c

index 58611a9..a6effa3 100644 (file)
  *   Florian octo Forster <octo at collectd.org>
  */
 
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <errno.h>
-#include <netdb.h>
-#include <inttypes.h>
-#include <pthread.h>
-
 #include "collectd.h"
+
 #include "plugin.h"
 #include "common.h"
 #include "configfile.h"
 #include "riemann.pb-c.h"
 #include "write_riemann_threshold.h"
 
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
 #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;
index b1f7297..4009366 100644 (file)
  *   Andrés J. Díaz <ajdiaz at connectical.com>
  **/
 
-#include <assert.h>
-#include <ltdl.h>
-#include <pthread.h>
-
 #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 <ltdl.h>
+
 /*
  * Threshold management
  * ====================