bpf: fix build with some libpcap version on FreeBSD
PATCH 1/1 bpf: fix build with some libpcap version on FreeBSD
This is something caught in UNH FreeBSD env.
For some reason [1], the pcap/bpf.h header started to define _BPF_H_.
It happens that the bpf_impl.h internal DPDK header uses this define as an internal guard.
This triggers a build failure in bpf_convert.c which can't find RTE_BPF_LOG macro.
Fix the include guard to use the filename and remove _.
1: https://github.com/the-tcpdump-group/libpcap/pull/1074
--- lib/bpf/bpf_impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
lib/bpf/bpf_impl.h +3 -3
@@ -2,8 +2,8 @@* Copyright(c) 2018 Intel Corporation */ -#ifndef _BPF_H_ -#define _BPF_H_ +#ifndef BPF_IMPL_H +#define BPF_IMPL_H #include <rte_bpf.h> #include <sys/mman.h>
@@ -43,4 +43,4 @@ bpf_size(uint32_t bpf_op_sz) return 0; } -#endif /* _BPF_H_ */ +#endif /* BPF_IMPL_H */
Signature · 1 line
2.23.0
Quoted 9 lines · On Thu, 10 Mar 2022 19:30:40 +0100 David Marchand <[email protected]>…
This is something caught in UNH FreeBSD env.
For some reason [1], the
pcap/bpf.hheader started to define _BPF_H_.It happens that the
bpf_impl.hinternal DPDK header uses this define as an internal guard.
This triggers a build failure inbpf_convert.cwhich can't findRTE_BPF_LOGmacro.
Quoted 8 lines
Fix the include guard to use the filename and remove _.
1: https://github.com/the-tcpdump-group/libpcap/pull/1074
Fixes 94972f35a02e ("bpf: add BPF loading and execution framework")Signed-off-by David Marchand <[email protected]>
Thomas Monjalon
Applied10/03/2022 19:54, Stephen Hemminger:
Quoted 14 lines
Quoted 11 lines · On Thu, 10 Mar 2022 19:30:40 +0100 David Marchand <[email protected]>…
This is something caught in UNH FreeBSD env.
For some reason [1], the
pcap/bpf.hheader started to define _BPF_H_.It happens that the
bpf_impl.hinternal DPDK header uses this define as an internal guard.
This triggers a build failure inbpf_convert.cwhich can't findRTE_BPF_LOGmacro.Fix the include guard to use the filename and remove _.
Quoted 8 lines
Quoted 6 lines
1: https://github.com/the-tcpdump-group/libpcap/pull/1074
Fixes 94972f35a02e ("bpf: add BPF loading and execution framework")Signed-off-by David Marchand <[email protected]>
Applied, thanks.