lkrg-org / lkrg

Linux Kernel Runtime Guard
https://lkrg.org
Other
402 stars 72 forks source link

x86: compile error: typedef redefinition with different types ('unsigned long' vs '__kernel_size_t' (aka 'unsigned int')) #254

Closed vt-alt closed 1 year ago

vt-alt commented 1 year ago

When compiling on 32-bit x86 there is error:

clang -g -O2 -target bpf -D__TARGET_ARCH_   -c bpf/stalld.bpf.c -o bpf/stalld.bpf.o
In file included from bpf/stalld.bpf.c:8:
In file included from /usr/include/string.h:33:
/usr/lib/llvm-13.0/lib/clang/13.0.1/include/stddef.h:46:23: error: typedef redefinition with different types ('unsigned long' vs '__kernel_size_t' (aka 'unsigned int'))
typedef __SIZE_TYPE__ size_t;
                      ^
bpf/vmlinux.h:85:25: note: previous definition is here
typedef __kernel_size_t size_t;
                        ^
1 error generated.
vt-alt commented 1 year ago

Excuse me I misfiled into wrong project.