diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2021-11-19 18:41:06 +0100 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2021-11-20 17:04:28 +0100 |
commit | 26bc41c0ad6477f8166aa99fd8b21ceb78b0bc97 (patch) | |
tree | 5ce544e3fbe80292e7d0d0dbc73578f87bb5f13a | |
parent | 98cd145d390fe45eebee9d4da6daaadd04e0adb2 (diff) |
tools/lib/bpf/: Don't redefine NULL
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r-- | tools/lib/bpf/bpf_helpers.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h index 2590d34f19b8..c38d3774e328 100644 --- a/tools/lib/bpf/bpf_helpers.h +++ b/tools/lib/bpf/bpf_helpers.h @@ -3,6 +3,7 @@ #define __BPF_HELPERS__ +#include <linux/NULL.h> #include <linux/offsetof.h> @@ -53,14 +54,10 @@ /* When utilizing vmlinux.h with BPF CO-RE, user BPF programs can't include * any system-level headers (such as stddef.h, linux/version.h, etc), and - * commonly-used macros like NULL and KERNEL_VERSION aren't available through + * commonly-used macros like KERNEL_VERSION aren't available through * vmlinux.h. This just adds unnecessary hurdles and forces users to re-define * them on their own. So as a convenience, provide such definitions here. */ -#ifndef NULL -#define NULL ((void *)0) -#endif - #ifndef KERNEL_VERSION #define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) #endif |