netfilter: ctnetlink: fix compilation with NF_CONNTRACK_EVENTS=n

This patch fixes compilation with NF_CONNTRACK_EVENTS=n and
NETFILTER_NETLINK_QUEUE_CT=y.

I'm leaving all those static inline functions that calculate the size
of the event message out of the ifdef area of NF_CONNTRACK_EVENTS since
they will not be included by gcc in case they are unused.

Change-Id: I6c8bb7c1fee7ffd7ba78c2a078d1b4d21ca91164
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
This commit is contained in:
Pablo Neira Ayuso 2012-06-23 01:43:51 +02:00 committed by Francescodario Cuzzocrea
parent 57f1ee282a
commit 1297a4d72d
1 changed files with 1 additions and 1 deletions

View File

@ -468,7 +468,6 @@ nla_put_failure:
return -1;
}
#ifdef CONFIG_NF_CONNTRACK_EVENTS
static inline size_t
ctnetlink_proto_size(const struct nf_conn *ct)
{
@ -555,6 +554,7 @@ ctnetlink_nlmsg_size(const struct nf_conn *ct)
;
}
#ifdef CONFIG_NF_CONNTRACK_EVENTS
static int
ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item)
{