diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-06-17 12:26:50 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-06-18 00:08:54 +0200 |
commit | d7fe74f9404a9736e9d4f754c30e43640a822c17 (patch) | |
tree | 6d2addde09dcb0095db479aa801575f173e886b8 /tools/lib/bpf/bpf_prog_linfo.c | |
parent | 7f94208c8f9a0a6d2ff0e0c0858c00ad8e5c8617 (diff) | |
download | linux-d7fe74f9404a9736e9d4f754c30e43640a822c17.tar.bz2 |
libbpf: add common min/max macro to libbpf_internal.h
Multiple files in libbpf redefine their own definitions for min/max.
Let's define them in libbpf_internal.h and use those everywhere.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/lib/bpf/bpf_prog_linfo.c')
-rw-r--r-- | tools/lib/bpf/bpf_prog_linfo.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/lib/bpf/bpf_prog_linfo.c b/tools/lib/bpf/bpf_prog_linfo.c index 6978314ea7f6..8c67561c93b0 100644 --- a/tools/lib/bpf/bpf_prog_linfo.c +++ b/tools/lib/bpf/bpf_prog_linfo.c @@ -6,10 +6,7 @@ #include <linux/err.h> #include <linux/bpf.h> #include "libbpf.h" - -#ifndef min -#define min(x, y) ((x) < (y) ? (x) : (y)) -#endif +#include "libbpf_internal.h" struct bpf_prog_linfo { void *raw_linfo; |