samples: bpf: fix build error due to -isystem removal
Subsystems (4)
PATCH 1/1 samples: bpf: fix build error due to -isystem removal
Since recent Kbuild updates we no longer include files from compiler directories. However, samples/bpf/hbm_kern.h hasn't been tuned for this (LLVM 13):
CLANG-bpf samples/bpf/hbm_out_kern.o
In file included from samples/bpf/hbm_out_kern.c:55:samples/bpf/hbm_kern.h:12:10: fatal error: 'stddef.h' file not found
^~~~~~~~~~
1 error generated.
CLANG-bpf samples/bpf/hbm_edt_kern.o
In file included from samples/bpf/hbm_edt_kern.c:53:samples/bpf/hbm_kern.h:12:10: fatal error: 'stddef.h' file not found
^~~~~~~~~~
1 error generated.
It is enough to just drop both stdbool.h and stddef.h from includes to fix those.
--- samples/bpf/hbm_kern.h | 2 -- 1 file changed, 2 deletions(-)
samples/bpf/hbm_kern.h +0 -2
@@ -9,8 +9,6 @@* Include file for sample Host Bandwidth Manager (HBM) BPF programs */ #define KBUILD_MODNAME "foo" -#include <stddef.h> -#include <stdbool.h> #include <uapi/linux/bpf.h> #include <uapi/linux/if_ether.h> #include <uapi/linux/if_packet.h>
Signature · 1 line
2.33.1
This patch was applied to bpf/bpf.git (master) by Daniel Borkmann <[email protected]>:
Hello:
This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <[email protected]>:
Quoted 8 lines · On Mon, 15 Nov 2021 14:07:41 +0100 you wrote:
Since recent
Kbuildupdates we no longer include files from compiler directories. However,samples/bpf/hbm_kern.hhasn't been tuned for this (LLVM 13):CLANG-bpf
samples/bpf/hbm_out_kern.o
In file included fromsamples/bpf/hbm_out_kern.c:55:samples/bpf/hbm_kern.h:12:10: fatal error: 'stddef.h' file not found^~~~~~~~~~
Quoted 8 lines
1 error generated.
CLANG-bpfsamples/bpf/hbm_edt_kern.o
In file included fromsamples/bpf/hbm_edt_kern.c:53:samples/bpf/hbm_kern.h:12:10: fatal error: 'stddef.h' file not found^~~~~~~~~~1 error generated.
[...]
Here is the summary with links:
- [bpf] samples: bpf: fix build error due to -isystem removal
https://git.kernel.org/bpf/bpf/c/6e528ca494d4
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html