Staging
v0.8.1
swh:1:snp:a902887e4be9191b7c6c4406aa06b31c1ce2c7cc
Raw File
Tip revision: 32c1431eea4881a6b17bd7c639315010aeefa452 authored by Linus Torvalds on 11 June 2017, 23:48:20 UTC
Linux 4.12-rc5
Tip revision: 32c1431
bpf-script-test-kbuild.c
/*
 * 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>
#include <uapi/asm/ptrace.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;
back to top