]> git.droids-corp.org - dpdk.git/commitdiff
bpf: fix build with some libpcap version on FreeBSD
authorDavid Marchand <david.marchand@redhat.com>
Thu, 10 Mar 2022 18:30:40 +0000 (19:30 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 14 Mar 2022 10:41:52 +0000 (11:41 +0100)
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

Fixes: 94972f35a02e ("bpf: add BPF loading and execution framework")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
lib/bpf/bpf_impl.h

index 26d165ad5cac00cd8a46e9d387299f57f1d1217b..b4d8e87c6dfbe40de7c659a466054b4ccf6473d3 100644 (file)
@@ -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 */