]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix build error without CONFIG_NET
authorYueHaibing <yuehaibing@huawei.com>
Fri, 18 Oct 2019 09:03:44 +0000 (17:03 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 18 Oct 2019 18:57:07 +0000 (20:57 +0200)
commitd2062788a300120dcb68e8131e364317ab9b48f3
tree9876da34a90984c6976b49c9cdff572d51e4ec75
parentea1b7d8e1746fdb058c641328eb576bd0fbf37bc
bpf: Fix build error without CONFIG_NET

If CONFIG_NET is n, building fails:

kernel/trace/bpf_trace.o: In function `raw_tp_prog_func_proto':
bpf_trace.c:(.text+0x1a34): undefined reference to `bpf_skb_output_proto'

Wrap it into a #ifdef to fix this.

Fixes: 5122ba07913a ("bpf: Check types of arguments passed into helpers")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20191018090344.26936-1-yuehaibing@huawei.com
kernel/trace/bpf_trace.c