From f2f3fbc07b37f993c6a4f978f8f13cfeb578093d Mon Sep 17 00:00:00 2001 From: Laura Garcia Liebana Date: Wed, 31 Oct 2018 12:54:18 +0100 Subject: json: fix json_events_cb() declaration when libjansson is not present MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When nftables is configured without libjansson support, the following compilation error is shown: monitor.c: In function ‘netlink_echo_callback’: monitor.c:910:10: error: too many arguments to function ‘json_events_cb’ return json_events_cb(nlh, &echo_monh); ^~~~~~~~~~~~~~ This patch makes a declaration of the json_events_cb() function consistent. Fixes: bb32d8db9a12 ("JSON: Add support for echo option") Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso --- include/json.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/json.h b/include/json.h index 8d45c3c3..c724c299 100644 --- a/include/json.h +++ b/include/json.h @@ -239,7 +239,8 @@ static inline void monitor_print_rule_json(struct netlink_mon_handler *monh, /* empty */ } -static inline int json_events_cb(const struct nlmsghdr *nlh) +static inline int json_events_cb(const struct nlmsghdr *nlh, + struct netlink_mon_handler *monh) { return -1; } -- cgit v1.2.3