Commit 93596cd
example/c: fix uprobe cross compiling issue
Some archs, like arm64, use userspace pt_regs in bpf_tracing.h.
When cross compiling arm64 bpf examples in x86_64 host, clang cannot
find the arch specific uapi ptrace.h, which causing below compiling errror,
"
uprobe.bpf.c:11:5: error: incomplete definition of type 'struct user_pt_regs'
11 | int BPF_KPROBE(uprobe_add, int a, int b)
"
Using arch specific vmlinux.h fix this issue.
Signed-off-by: wangjie <wangjie22@lixiang.com>1 parent 11750e4 commit 93596cd
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
0 commit comments