summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ce025f4)
raw | patch | inline | side by side (parent: ce025f4)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Wed, 10 Aug 2016 11:04:27 +0000 (13:04 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Wed, 10 Aug 2016 11:04:27 +0000 (13:04 +0200) |
cc1: warnings being treated as errors
common.c: In function 'set_sock_opts':
common.c:1572: warning: unused variable 'tcp_keepintvl'
common.c:1571: warning: unused variable 'tcp_keepidle'
*** Error 1 in target 'common.lo'
*** Error 1 in src/daemon (Makefile:1048 'common.lo': @echo " CC " common.lo;depbase=`echo common.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$|...)
*** Error 1 in src (Makefile:5007 'all-recursive')
*** Error 2 in src (Makefile:3284 'all')
*** Error 1 in /root/src/collectd (Makefile:611 'all-recursive')
common.c: In function 'set_sock_opts':
common.c:1572: warning: unused variable 'tcp_keepintvl'
common.c:1571: warning: unused variable 'tcp_keepidle'
*** Error 1 in target 'common.lo'
*** Error 1 in src/daemon (Makefile:1048 'common.lo': @echo " CC " common.lo;depbase=`echo common.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$|...)
*** Error 1 in src (Makefile:5007 'all-recursive')
*** Error 2 in src (Makefile:3284 'all')
*** Error 1 in /root/src/collectd (Makefile:611 'all-recursive')
src/daemon/common.c | patch | blob | history |
diff --git a/src/daemon/common.c b/src/daemon/common.c
index c4dbecbec9cb8c9c4d883d9b11def27ca1316390..c6559a804e3b003c45e2566c466c7f5413b2d6f3 100644 (file)
--- a/src/daemon/common.c
+++ b/src/daemon/common.c
socklen_t socklen = sizeof (socklen_t);
int so_keepalive = 1;
- int tcp_keepidle = ((CDTIME_T_TO_MS(plugin_get_interval()) - 1) / 100 + 1);
- int tcp_keepintvl = ((CDTIME_T_TO_MS(plugin_get_interval()) - 1) / 1000 + 1);
status = getsockopt (sockfd, SOL_SOCKET, SO_TYPE, &socktype, &socklen);
if (status != 0)
WARNING ("set_sock_opts: failed to set socket keepalive flag");
#ifdef TCP_KEEPIDLE
+ int tcp_keepidle = ((CDTIME_T_TO_MS(plugin_get_interval()) - 1) / 100 + 1);
status = setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
&tcp_keepidle, sizeof (tcp_keepidle));
if (status != 0)
#endif
#ifdef TCP_KEEPINTVL
+ int tcp_keepintvl = ((CDTIME_T_TO_MS(plugin_get_interval()) - 1) / 1000 + 1);
status = setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
&tcp_keepintvl, sizeof (tcp_keepintvl));
if (status != 0)