android_system_bpf/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Motomu Utsumi 4ed7d8f093 Fix __always_inline macro conflict and add linux/bpf.h include
The bpf_helpers.h in libbpf defines the `__always_inline` macro
using the `inline` keyword (`inline __attribute__((always_inline))`).
`cdefs.h` defines `__always_inline` using only the attribute
(`__attribute__((__always_inline__))`).

This leads to "duplicate 'inline' declaration" errors depending on the order
in which these headers are included.

To prevent such conflicts, this CL explicitly redefines
`__always_inline` using `__attribute__((__always_inline__))` immediately
after including <bpf/bpf_helpers.h>.

This CL also adds an include of <linux/bpf.h> for BPF map types
(e.g. BPF_MAP_TYPE_RINGBUF).

Bug: 410982483
Test: m bpfMemEvents.bpf bpfMemEventsTest.bpf
Change-Id: Ib55805c09a7946b537f55512f9d88141b561e0ab
2025-05-12 15:23:02 +09:00
..
defs Fix __always_inline macro conflict and add linux/bpf.h include 2025-05-12 15:23:02 +09:00
vmlinux BPF: Add vmlinux.h 2024-09-17 22:13:54 +00:00