X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fiptables.c;h=c0854b3f38148f62837699b2289f75e2a22e743a;hb=448627953cde2f7b3b138f53f4f2c62f0d48b726;hp=a2ed4c731e11bda9dfa9d7af92d18a09f90ccd27;hpb=e5e5d99350fa54e22f07b90fbc3102df51565ad9;p=collectd.git diff --git a/src/iptables.c b/src/iptables.c index a2ed4c73..c0854b3f 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -30,13 +30,13 @@ #include "plugin.h" #include "configfile.h" +#include +#include + #ifdef HAVE_SYS_CAPABILITY_H # include #endif -#include -#include - /* * iptc_handle_t was available before libiptc was officially available as a * shared library. Note, that when the shared lib was introduced, the API and @@ -505,7 +505,7 @@ static int iptables_shutdown (void) static int iptables_init (void) { -#ifdef HAVE_SYS_CAPABILITY_H +#if defined(HAVE_SYS_CAPABILITY_H) && defined(CAP_NET_ADMIN) if (check_capability (CAP_NET_ADMIN) != 0) { if (getuid () == 0)