bpf_get_current_task compile error #903
Answered
by
lmb
liuchenailq
asked this question in
Q&A
-
I want to get the pid and ppid of the process. My approach is as follows:
But when compiling, I get the following error:
I added <linux/sched.h> or reported this error |
Beta Was this translation helpful? Give feedback.
Answered by
lmb
Jan 17, 2023
Replies: 1 comment
-
The problem is that your C headers do not contain the full type definition for |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
florianl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem is that your C headers do not contain the full type definition for
struct task_struct
. Instead of including linux headers directly I suggest usingvmlinux.h
.