bpf: Fix double inclusions
Don't include <linux/bpf.h> if using vmlinux; as this causes double inclusions. Bug: 419635765 Test: manual; build and load a CO-RE BPF program Change-Id: I4419778ea71b65ce46ac5e0e6358c33d7f78b82e Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
parent
315feea5fc
commit
0227ca2982
1 changed files with 1 additions and 1 deletions
|
|
@ -7,6 +7,7 @@
|
|||
// When using vmlinux.h, you can't use any system level headers.
|
||||
#include <vmlinux.h>
|
||||
#else
|
||||
#include <linux/bpf.h>
|
||||
#include <linux/types.h>
|
||||
#endif // USE_VMLINUX
|
||||
#include <bpf/bpf_helpers.h>
|
||||
|
|
@ -17,7 +18,6 @@
|
|||
#undef __always_inline
|
||||
#define __always_inline __attribute__((__always_inline__))
|
||||
|
||||
#include <linux/bpf.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define DEFINE_BPF_MAP_BASE(the_map, TYPE, KeyType, ValueType, num_entries, gid) \
|
||||
|
|
|
|||
Loading…
Reference in a new issue