mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-24 02:09:06 +08:00
libbpf: make sure linux/kernel.h includes linux/compiler.h
This replicates kernel upstream setup and brings READ_ONCE() and WRITE_ONCE() macros anywhere where linux/kernel.h is included, which is assumption libbpf code makes. Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
This commit is contained in:
committed by
Andrii Nakryiko
parent
8ca30626cc
commit
fad5d91381
@@ -3,6 +3,8 @@
|
||||
#ifndef __LINUX_KERNEL_H
|
||||
#define __LINUX_KERNEL_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
#ifndef offsetof
|
||||
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user