mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
![Arnaldo Carvalho de Melo](/assets/img/avatar_default.png)
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-p0kg493z2m8qizjbdefzip1i@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
21 lines
536 B
C
21 lines
536 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* bpf-script-test-kbuild.c
|
|
* Test include from kernel header
|
|
*/
|
|
#ifndef LINUX_VERSION_CODE
|
|
# error Need LINUX_VERSION_CODE
|
|
# error Example: for 4.2 kernel, put 'clang-opt="-DLINUX_VERSION_CODE=0x40200" into llvm section of ~/.perfconfig'
|
|
#endif
|
|
#define SEC(NAME) __attribute__((section(NAME), used))
|
|
|
|
#include <uapi/linux/fs.h>
|
|
|
|
SEC("func=vfs_llseek")
|
|
int bpf_func__vfs_llseek(void *ctx)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
char _license[] SEC("license") = "GPL";
|
|
int _version SEC("version") = LINUX_VERSION_CODE;
|