Messages in this thread Patch in this message | | | From | Wang Nan <> | Subject | [PATCH 01/10] bpf samples: bpf: Fix tracex5_kern.c compiling error | Date | Thu, 17 Dec 2015 05:23:05 +0000 |
| |
LLVM report compiling error:
/kpathsamples/bpf/tracex5_kern.c:33:15: error: use of undeclared identifier '__NR_getuid'; did you mean '__NR_vgetcpu'? if (sd.nr >= __NR_getuid && sd.nr <= __NR_getsid) { ^~~~~~~~~~~ __NR_vgetcpu /kpath/arch/x86/include/uapi/asm/vsyscall.h:7:2: note: '__NR_vgetcpu' declared here __NR_vgetcpu,
This patch fix it by adding asm/unistd.h to it.
Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Alexei Starovoitov <ast@plumgrid.com> Cc: David S. Miller <davem@davemloft.net> --- samples/bpf/tracex5_kern.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/samples/bpf/tracex5_kern.c b/samples/bpf/tracex5_kern.c index b3f4295..2964efd 100644 --- a/samples/bpf/tracex5_kern.c +++ b/samples/bpf/tracex5_kern.c @@ -8,6 +8,7 @@ #include <linux/version.h> #include <uapi/linux/bpf.h> #include <uapi/linux/seccomp.h> +#include <asm/unistd.h> #include "bpf_helpers.h" #define PROG(F) SEC("kprobe/"__stringify(F)) int bpf_func_##F -- 1.8.3.4
| |