Code

core: include <sys/socket.h> in collectd.h
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 1 Aug 2015 10:19:58 +0000 (12:19 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 1 Aug 2015 10:19:58 +0000 (12:19 +0200)
Fixes #1127

33 files changed:
src/apcups.c
src/ceph.c
src/curl_json.c
src/daemon/collectd.c
src/daemon/collectd.h
src/daemon/common.c
src/email.c
src/gmond.c
src/hddtemp.c
src/interface.c
src/iptables.c
src/ipvs.c
src/madwifi.c
src/mbmon.c
src/memcached.c
src/netlink.c
src/network.c
src/ntpd.c
src/olsrd.c
src/pf.c
src/pinba.c
src/powerdns.c
src/statsd.c
src/tcpconns.c
src/teamspeak2.c
src/unixsock.c
src/utils_dns.c
src/write_graphite.c
src/write_log.c
src/write_riemann.c
src/write_sensu.c
src/write_tsdb.c
src/zookeeper.c

index dc533f1e48eb3b741c2f37eeb6978694ff01aa96..718061ae36e693a9125325f3403da98f25be2316 100644 (file)
@@ -32,9 +32,6 @@
 #if HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
 #if HAVE_NETDB_H
 # include <netdb.h>
 #endif
index d928a7ba4b5db1d71e87449f635783e44000f621..419ca6e56170758c5c05dea2e1e20994b53b2ff3 100644 (file)
@@ -43,7 +43,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <strings.h>
-#include <sys/socket.h>
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/un.h>
index 5aceae4e59e45ee55e3400340660c51b4dc4f78f..80632424785ae697b8a809588cac5f1b2e61ba15 100644 (file)
@@ -28,7 +28,6 @@
 #include "utils_avltree.h"
 #include "utils_complain.h"
 
-#include <sys/socket.h>
 #include <sys/types.h>
 #include <sys/un.h>
 
index a40e6046384b77fc15c5cea43e95a5d472cc1696..58325b95be73973b5cd5c596466255d3a325f6a5 100644 (file)
@@ -32,7 +32,6 @@
 #include "configfile.h"
 
 #include <sys/types.h>
-#include <sys/socket.h>
 #include <sys/un.h>
 #include <netdb.h>
 
index 80b753c8a83442b3e278858a8cb54528bf9868d1..66b485681b223c97c7fda9cc595a16d9616e0494 100644 (file)
@@ -95,6 +95,9 @@
 #  include <time.h>
 # endif
 #endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
 
 #if HAVE_ASSERT_H
 # include <assert.h>
index abe9a6e8471df65f7c8388d2699c936b96bd8880..8f22011ed57c46c94244f8273461fce3fa7af155 100644 (file)
@@ -46,7 +46,6 @@
 
 /* for getaddrinfo */
 #include <sys/types.h>
-#include <sys/socket.h>
 #include <netdb.h>
 
 #if HAVE_NETINET_IN_H
index 365af274d4274cb70d42215e04c11e2fb08c3851..1bf9addaea09631f005ec96af2e97c9fdd602a56 100644 (file)
@@ -50,7 +50,6 @@
 # include <pthread.h>
 #endif
 
-#include <sys/socket.h>
 #include <sys/un.h>
 #include <sys/select.h>
 
index 4660713b4cbcc6f5d7887a70c9b16963f0c3dc3d..c778d48dceb9a1ff4848c72571107d8f87c63471 100644 (file)
@@ -33,9 +33,6 @@
 #if HAVE_PTHREAD_H
 # include <pthread.h>
 #endif
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
 #if HAVE_NETDB_H
 # include <netdb.h>
 #endif
index 82c158cab17180dc18a4d5e878d1704b60e081ce..3de18fd91354d166a58beff919d4b38e65e0fe33 100644 (file)
@@ -35,7 +35,6 @@
 #include "configfile.h"
 
 # include <netdb.h>
-# include <sys/socket.h>
 # include <netinet/in.h>
 # include <netinet/tcp.h>
 # include <libgen.h> /* for basename */
index df8ffb46c34522ee5696b22a3409a687c37161e4..e17711e3105ae31ccd106576ede46b72dc5b48a4 100644 (file)
@@ -31,9 +31,6 @@
 #if HAVE_SYS_TYPES_H
 #  include <sys/types.h>
 #endif
-#if HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 
 /* One cannot include both. This sucks. */
 #if HAVE_LINUX_IF_H
index 606b24d9afdacfeda05ecd30a44f4976d674377a..806b7a457f76308c3226aa3255444e97eeda20d5 100644 (file)
@@ -29,8 +29,6 @@
 #include "plugin.h"
 #include "configfile.h"
 
-#include <sys/socket.h>
-
 #include <libiptc/libiptc.h>
 #include <libiptc/libip6tc.h>
 
index 38e464107bd7e79deabe31cff82719007d7753e9..4345a46532237081bcd8ff075102e6d34635f4a7 100644 (file)
@@ -37,9 +37,6 @@
 #if HAVE_ARPA_INET_H
 # include <arpa/inet.h>
 #endif /* HAVE_ARPA_INET_H */
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif /* HAVE_SYS_SOCKET_H */
 #if HAVE_NETINET_IN_H
 # include <netinet/in.h>
 #endif /* HAVE_NETINET_IN_H */
index d3a58030681493f23fa23ef196fa26ca977f6992..bb33b15d2c7818fe6cd3b623fd3fece4d1f47814 100644 (file)
@@ -96,7 +96,6 @@
 
 #include <dirent.h>
 #include <sys/ioctl.h>
-#include <sys/socket.h>
 
 #if !KERNEL_LINUX
 # error "No applicable input method."
index d23062db2d54734551789c76cac837c9915c43f2..5e87f00b7087935786d695a6b37387df00901ce5 100644 (file)
@@ -29,7 +29,6 @@
 #include "configfile.h"
 
 #include <netdb.h>
-#include <sys/socket.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 
index 472b089734ceb6263d53c5196b7846503e9dcabd..f684abffe9314515771d75cef1d1cd81143838ee 100644 (file)
@@ -34,7 +34,6 @@
 #include "configfile.h"
 
 #include <netdb.h>
-#include <sys/socket.h>
 #include <sys/un.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
index aa9760f9328b78eb87e14f70501bc1622a57f12d..e1f378d9408a741a6e75c85efe62ee5a80426028 100644 (file)
@@ -30,7 +30,6 @@
 #include "common.h"
 
 #include <asm/types.h>
-#include <sys/socket.h>
 
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
index 0c74e224c7bac7b6003dabc5dee7f2a1a4f842c4..916900065aff9241a99454ab86cd2bf675655d8f 100644 (file)
@@ -39,9 +39,6 @@
 #if HAVE_PTHREAD_H
 # include <pthread.h>
 #endif
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
 #if HAVE_NETDB_H
 # include <netdb.h>
 #endif
index 952ab7cabedd3be31903ffaad2aa0cb4a74fecfd..dbde6609f64527ff8d58c91a4e9fda5f53e226e6 100644 (file)
@@ -38,9 +38,6 @@
 #if HAVE_NETDB_H
 # include <netdb.h>
 #endif
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
 #if HAVE_NETINET_IN_H
 # include <netinet/in.h>
 #endif
index 6d0576cf7bc7d26e39567646f40fa1ebd49262cc..bbf387f4123dfe12a375ca85b234fd315843e385 100644 (file)
@@ -30,7 +30,6 @@
 
 #include <sys/types.h>
 #include <netdb.h>
-#include <sys/socket.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 
index 29f3a3d539f19ecefceb6d5f9c09201ef7fb8dd3..d11bd8aaedabb6c2b5232009671007218156a0a3 100644 (file)
--- a/src/pf.c
+++ b/src/pf.c
@@ -26,9 +26,6 @@
 #if HAVE_SYS_IOCTL_H
 # include <sys/ioctl.h>
 #endif
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
 #if HAVE_NET_IF_H
 # include <net/if.h>
 #endif
index 9f0a80023324d55c00871c2299a22aa484978f74..b6e7b152554a13b00af34ab0fe6bbf3d9be67381 100644 (file)
@@ -29,7 +29,6 @@
 #include "configfile.h"
 
 #include <pthread.h>
-#include <sys/socket.h>
 #include <netdb.h>
 #include <poll.h>
 
index 7b7cab39ddd62580b9e45fe28caf92b871b2822e..5ea1b098402c5e6c1c8231f72f0d1a74bbe96c8a 100644 (file)
@@ -37,7 +37,6 @@
 #include <string.h>
 #include <errno.h>
 #include <sys/types.h>
-#include <sys/socket.h>
 #include <sys/un.h>
 
 #ifndef UNIX_PATH_MAX
index 5b0bdd693de71088f8ec47f3560b29c4c87f79f5..9a6da1d34fafafa49f2681149e5d7161176a613e 100644 (file)
@@ -35,7 +35,6 @@
 #include <pthread.h>
 
 #include <sys/types.h>
-#include <sys/socket.h>
 #include <netdb.h>
 #include <poll.h>
 
index 5d4bb6966f98b024e57ffc7fd0956082777212ab..8f40be6f786b13d901c4ee5847580c0a01db270e 100644 (file)
 
 #if KERNEL_LINUX
 # include <asm/types.h>
-/* sys/socket.h is necessary to compile when using netlink on older systems. */
-# include <sys/socket.h>
 # include <linux/netlink.h>
 #if HAVE_LINUX_INET_DIAG_H
 # include <linux/inet_diag.h>
 #endif
-# include <sys/socket.h>
 # include <arpa/inet.h>
 /* #endif KERNEL_LINUX */
 
@@ -90,9 +87,6 @@
 #if HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
 #if HAVE_NET_IF_H
 # include <net/if.h>
 #endif
 /* This is for OpenBSD and NetBSD. */
 #elif HAVE_LIBKVM_NLIST
 # include <sys/queue.h>
-# include <sys/socket.h>
 # include <net/route.h>
 # include <netinet/in.h>
 # include <netinet/in_systm.h>
index 201e1828a2b2037093fde4b02c45709a53d6d062..56e8d14e968642d4f632542ac8f9047a3562bf0d 100644 (file)
@@ -28,7 +28,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <sys/types.h>
-#include <sys/socket.h>
 #include <netdb.h>
 
 /*
index 664c0184a5d21a793e1fc529dcbe6fbdddfbcde8..e6c75a65644e7441425183fb1b041c9bb93274c0 100644 (file)
@@ -39,7 +39,6 @@
 /* Folks without pthread will need to disable this plugin. */
 #include <pthread.h>
 
-#include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/un.h>
 
index f83fc02c401cdd278d49ade7eea057f6ab4902c8..4c763a1420a04a4008d0d16ce4000e1da9f3aceb 100644 (file)
 #include "plugin.h"
 #include "common.h"
 
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-
 #if HAVE_NET_IF_ARP_H
 # include <net/if_arp.h>
 #endif
index 41451a8cee8f8d0bab4dda5d81361b3efd30a229..997a887752476aa1ff105e6df7b7b1a132025715 100644 (file)
@@ -54,7 +54,6 @@
 /* Folks without pthread will need to disable this plugin. */
 #include <pthread.h>
 
-#include <sys/socket.h>
 #include <netdb.h>
 
 #ifndef WG_DEFAULT_NODE
index e37aae9fd594fcce3ecd6d5abac7a6fb33adf32c..ebf0e12445cc9e9e3900a8416c3cedcf6db1a9eb 100644 (file)
@@ -35,7 +35,6 @@
 /* Folks without pthread will need to disable this plugin. */
 #include <pthread.h>
 
-#include <sys/socket.h>
 #include <netdb.h>
 
 #define WL_BUF_SIZE 8192
index 26fa3f45680358ee156f8576b6adfaf30be620a9..73d202c42fe8f228aaea46279dd12827a16d0371 100644 (file)
@@ -33,7 +33,6 @@
 #include "utils_cache.h"
 #include "riemann.pb-c.h"
 
-#include <sys/socket.h>
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netdb.h>
index 791acb307c54612f3e78de98f322f7c48e6b0458..67c04969227302c4f7f81dc0bafa2016587bd32a 100644 (file)
@@ -29,7 +29,6 @@
 #include "common.h"
 #include "configfile.h"
 #include "utils_cache.h"
-#include <sys/socket.h>
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netdb.h>
index 2c39ec16e9713c8a26b41cb85d8289007b7a02b8..4a626144f60498c2cd3a83fafba728c8b82b9b1b 100644 (file)
@@ -49,7 +49,6 @@
 #include "utils_cache.h"
 
 #include <pthread.h>
-#include <sys/socket.h>
 #include <netdb.h>
 
 #ifndef WT_DEFAULT_NODE
index 63ee6c90040596ec54198ee2a11909611dc04ad0..abdbf20f3361d257165d4697346e98213caeca11 100644 (file)
@@ -29,7 +29,6 @@
 #include "plugin.h"
 
 #include <netdb.h>
-#include <sys/socket.h>
 #include <sys/un.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>