From 6bf2e82bf5049af097beae4a8b7f086466520839 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 1 Aug 2015 12:19:58 +0200 Subject: [PATCH] core: include in collectd.h Fixes #1127 --- src/apcups.c | 3 --- src/ceph.c | 1 - src/curl_json.c | 1 - src/daemon/collectd.c | 1 - src/daemon/collectd.h | 3 +++ src/daemon/common.c | 1 - src/email.c | 1 - src/gmond.c | 3 --- src/hddtemp.c | 1 - src/interface.c | 3 --- src/iptables.c | 2 -- src/ipvs.c | 3 --- src/madwifi.c | 1 - src/mbmon.c | 1 - src/memcached.c | 1 - src/netlink.c | 1 - src/network.c | 3 --- src/ntpd.c | 3 --- src/olsrd.c | 1 - src/pf.c | 3 --- src/pinba.c | 1 - src/powerdns.c | 1 - src/statsd.c | 1 - src/tcpconns.c | 7 ------- src/teamspeak2.c | 1 - src/unixsock.c | 1 - src/utils_dns.c | 4 ---- src/write_graphite.c | 1 - src/write_log.c | 1 - src/write_riemann.c | 1 - src/write_sensu.c | 1 - src/write_tsdb.c | 1 - src/zookeeper.c | 1 - 33 files changed, 3 insertions(+), 56 deletions(-) diff --git a/src/apcups.c b/src/apcups.c index dc533f1e..718061ae 100644 --- a/src/apcups.c +++ b/src/apcups.c @@ -32,9 +32,6 @@ #if HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_SOCKET_H -# include -#endif #if HAVE_NETDB_H # include #endif diff --git a/src/ceph.c b/src/ceph.c index d928a7ba..419ca6e5 100644 --- a/src/ceph.c +++ b/src/ceph.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/src/curl_json.c b/src/curl_json.c index 5aceae4e..80632424 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -28,7 +28,6 @@ #include "utils_avltree.h" #include "utils_complain.h" -#include #include #include diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c index a40e6046..58325b95 100644 --- a/src/daemon/collectd.c +++ b/src/daemon/collectd.c @@ -32,7 +32,6 @@ #include "configfile.h" #include -#include #include #include diff --git a/src/daemon/collectd.h b/src/daemon/collectd.h index 80b753c8..66b48568 100644 --- a/src/daemon/collectd.h +++ b/src/daemon/collectd.h @@ -95,6 +95,9 @@ # include # endif #endif +#if HAVE_SYS_SOCKET_H +# include +#endif #if HAVE_ASSERT_H # include diff --git a/src/daemon/common.c b/src/daemon/common.c index abe9a6e8..8f22011e 100644 --- a/src/daemon/common.c +++ b/src/daemon/common.c @@ -46,7 +46,6 @@ /* for getaddrinfo */ #include -#include #include #if HAVE_NETINET_IN_H diff --git a/src/email.c b/src/email.c index 365af274..1bf9adda 100644 --- a/src/email.c +++ b/src/email.c @@ -50,7 +50,6 @@ # include #endif -#include #include #include diff --git a/src/gmond.c b/src/gmond.c index 4660713b..c778d48d 100644 --- a/src/gmond.c +++ b/src/gmond.c @@ -33,9 +33,6 @@ #if HAVE_PTHREAD_H # include #endif -#if HAVE_SYS_SOCKET_H -# include -#endif #if HAVE_NETDB_H # include #endif diff --git a/src/hddtemp.c b/src/hddtemp.c index 82c158ca..3de18fd9 100644 --- a/src/hddtemp.c +++ b/src/hddtemp.c @@ -35,7 +35,6 @@ #include "configfile.h" # include -# include # include # include # include /* for basename */ diff --git a/src/interface.c b/src/interface.c index df8ffb46..e17711e3 100644 --- a/src/interface.c +++ b/src/interface.c @@ -31,9 +31,6 @@ #if HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_SOCKET_H -# include -#endif /* One cannot include both. This sucks. */ #if HAVE_LINUX_IF_H diff --git a/src/iptables.c b/src/iptables.c index 606b24d9..806b7a45 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -29,8 +29,6 @@ #include "plugin.h" #include "configfile.h" -#include - #include #include diff --git a/src/ipvs.c b/src/ipvs.c index 38e46410..4345a465 100644 --- a/src/ipvs.c +++ b/src/ipvs.c @@ -37,9 +37,6 @@ #if HAVE_ARPA_INET_H # include #endif /* HAVE_ARPA_INET_H */ -#if HAVE_SYS_SOCKET_H -# include -#endif /* HAVE_SYS_SOCKET_H */ #if HAVE_NETINET_IN_H # include #endif /* HAVE_NETINET_IN_H */ diff --git a/src/madwifi.c b/src/madwifi.c index d3a58030..bb33b15d 100644 --- a/src/madwifi.c +++ b/src/madwifi.c @@ -96,7 +96,6 @@ #include #include -#include #if !KERNEL_LINUX # error "No applicable input method." diff --git a/src/mbmon.c b/src/mbmon.c index d23062db..5e87f00b 100644 --- a/src/mbmon.c +++ b/src/mbmon.c @@ -29,7 +29,6 @@ #include "configfile.h" #include -#include #include #include diff --git a/src/memcached.c b/src/memcached.c index 472b0897..f684abff 100644 --- a/src/memcached.c +++ b/src/memcached.c @@ -34,7 +34,6 @@ #include "configfile.h" #include -#include #include #include #include diff --git a/src/netlink.c b/src/netlink.c index aa9760f9..e1f378d9 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -30,7 +30,6 @@ #include "common.h" #include -#include #include #include diff --git a/src/network.c b/src/network.c index 0c74e224..91690006 100644 --- a/src/network.c +++ b/src/network.c @@ -39,9 +39,6 @@ #if HAVE_PTHREAD_H # include #endif -#if HAVE_SYS_SOCKET_H -# include -#endif #if HAVE_NETDB_H # include #endif diff --git a/src/ntpd.c b/src/ntpd.c index 952ab7ca..dbde6609 100644 --- a/src/ntpd.c +++ b/src/ntpd.c @@ -38,9 +38,6 @@ #if HAVE_NETDB_H # include #endif -#if HAVE_SYS_SOCKET_H -# include -#endif #if HAVE_NETINET_IN_H # include #endif diff --git a/src/olsrd.c b/src/olsrd.c index 6d0576cf..bbf387f4 100644 --- a/src/olsrd.c +++ b/src/olsrd.c @@ -30,7 +30,6 @@ #include #include -#include #include #include diff --git a/src/pf.c b/src/pf.c index 29f3a3d5..d11bd8aa 100644 --- a/src/pf.c +++ b/src/pf.c @@ -26,9 +26,6 @@ #if HAVE_SYS_IOCTL_H # include #endif -#if HAVE_SYS_SOCKET_H -# include -#endif #if HAVE_NET_IF_H # include #endif diff --git a/src/pinba.c b/src/pinba.c index 9f0a8002..b6e7b152 100644 --- a/src/pinba.c +++ b/src/pinba.c @@ -29,7 +29,6 @@ #include "configfile.h" #include -#include #include #include diff --git a/src/powerdns.c b/src/powerdns.c index 7b7cab39..5ea1b098 100644 --- a/src/powerdns.c +++ b/src/powerdns.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #ifndef UNIX_PATH_MAX diff --git a/src/statsd.c b/src/statsd.c index 5b0bdd69..9a6da1d3 100644 --- a/src/statsd.c +++ b/src/statsd.c @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/src/tcpconns.c b/src/tcpconns.c index 5d4bb696..8f40be6f 100644 --- a/src/tcpconns.c +++ b/src/tcpconns.c @@ -71,13 +71,10 @@ #if KERNEL_LINUX # include -/* sys/socket.h is necessary to compile when using netlink on older systems. */ -# include # include #if HAVE_LINUX_INET_DIAG_H # include #endif -# include # include /* #endif KERNEL_LINUX */ @@ -90,9 +87,6 @@ #if HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_SOCKET_H -# include -#endif #if HAVE_NET_IF_H # include #endif @@ -113,7 +107,6 @@ /* This is for OpenBSD and NetBSD. */ #elif HAVE_LIBKVM_NLIST # include -# include # include # include # include diff --git a/src/teamspeak2.c b/src/teamspeak2.c index 201e1828..56e8d14e 100644 --- a/src/teamspeak2.c +++ b/src/teamspeak2.c @@ -28,7 +28,6 @@ #include #include #include -#include #include /* diff --git a/src/unixsock.c b/src/unixsock.c index 664c0184..e6c75a65 100644 --- a/src/unixsock.c +++ b/src/unixsock.c @@ -39,7 +39,6 @@ /* Folks without pthread will need to disable this plugin. */ #include -#include #include #include diff --git a/src/utils_dns.c b/src/utils_dns.c index f83fc02c..4c763a14 100644 --- a/src/utils_dns.c +++ b/src/utils_dns.c @@ -40,10 +40,6 @@ #include "plugin.h" #include "common.h" -#if HAVE_SYS_SOCKET_H -# include -#endif - #if HAVE_NET_IF_ARP_H # include #endif diff --git a/src/write_graphite.c b/src/write_graphite.c index 41451a8c..997a8877 100644 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@ -54,7 +54,6 @@ /* Folks without pthread will need to disable this plugin. */ #include -#include #include #ifndef WG_DEFAULT_NODE diff --git a/src/write_log.c b/src/write_log.c index e37aae9f..ebf0e124 100644 --- a/src/write_log.c +++ b/src/write_log.c @@ -35,7 +35,6 @@ /* Folks without pthread will need to disable this plugin. */ #include -#include #include #define WL_BUF_SIZE 8192 diff --git a/src/write_riemann.c b/src/write_riemann.c index 26fa3f45..73d202c4 100644 --- a/src/write_riemann.c +++ b/src/write_riemann.c @@ -33,7 +33,6 @@ #include "utils_cache.h" #include "riemann.pb-c.h" -#include #include #include #include diff --git a/src/write_sensu.c b/src/write_sensu.c index 791acb30..67c04969 100644 --- a/src/write_sensu.c +++ b/src/write_sensu.c @@ -29,7 +29,6 @@ #include "common.h" #include "configfile.h" #include "utils_cache.h" -#include #include #include #include diff --git a/src/write_tsdb.c b/src/write_tsdb.c index 2c39ec16..4a626144 100644 --- a/src/write_tsdb.c +++ b/src/write_tsdb.c @@ -49,7 +49,6 @@ #include "utils_cache.h" #include -#include #include #ifndef WT_DEFAULT_NODE diff --git a/src/zookeeper.c b/src/zookeeper.c index 63ee6c90..abdbf20f 100644 --- a/src/zookeeper.c +++ b/src/zookeeper.c @@ -29,7 +29,6 @@ #include "plugin.h" #include -#include #include #include #include -- 2.11.0