X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fnetlink.c;h=7c4bef5a83f79f41796a473b6f6956e17a84e9fb;hp=ef851d354937a0069969b7822b5ce6de0879a739;hb=d19bcbf5c310f3656503e64ba26829256112ded4;hpb=30f927c17e617e2357da273477585c96f7ffa408 diff --git a/src/netlink.c b/src/netlink.c index ef851d35..7c4bef5a 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -570,8 +570,14 @@ static int ir_read (void) return (-1); } +#ifdef RTNL_DUMP_FILTER_FIVE_ARGS if (rtnl_dump_filter (&rth, link_filter, /* arg1 = */ NULL, NULL, NULL) != 0) +#elif defined(RTNL_DUMP_FILTER_THREE_ARGS) + if (rtnl_dump_filter (&rth, link_filter, /* arg = */ NULL) != 0) +#else +#error "Failed to determine the number of arguments to 'rtnl_dump_filter'!" +#endif { ERROR ("netlink plugin: ir_read: rtnl_dump_filter failed."); return (-1); @@ -608,8 +614,14 @@ static int ir_read (void) continue; } +#ifdef RTNL_DUMP_FILTER_FIVE_ARGS if (rtnl_dump_filter (&rth, qos_filter, (void *) &ifindex, NULL, NULL) != 0) +#elif defined(RTNL_DUMP_FILTER_THREE_ARGS) + if (rtnl_dump_filter (&rth, qos_filter, /* arg = */ &ifindex) != 0) +#else +#error "Failed to determine the number of arguments to 'rtnl_dump_filter'!" +#endif { ERROR ("netlink plugin: ir_read: rtnl_dump_filter failed."); continue;