When use the "make W=1Arch=x86_64 net/" command for compilation, the following issue occurs: net/netfilter/nf_nat_proto.c:56:6: warning: no previous prototype for ‘nf_nat_csum_recalc’ [-Wmissing-prototypes] void nf_nat_csum_recalc(struct sk_buff *skb, ^~~~~~~~~~~~~~~~~~ To fix the issue, add the necessary header files.
Fixes: 83abe3a3b857 ("netfilter: nat: remove csum_recalc hook") Signed-off-by: Zhengchao Shao shaozhengchao@huawei.com --- net/netfilter/nf_nat_proto.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/net/netfilter/nf_nat_proto.c b/net/netfilter/nf_nat_proto.c index a4b68557b0f9..9114168bb84b 100644 --- a/net/netfilter/nf_nat_proto.c +++ b/net/netfilter/nf_nat_proto.c @@ -12,6 +12,8 @@ #include <net/ip6_route.h> #include <net/xfrm.h> #include <net/ipv6.h> +#include <uapi/linux/netfilter/nf_nat.h> +#include <net/netfilter/nf_nat_l3proto.h>
static void nf_nat_ipv4_csum_recalc(struct sk_buff *skb, u8 proto, void *data, __sum16 *check,