From d7fe74f9404a9736e9d4f754c30e43640a822c17 Mon Sep 17 00:00:00 2001 From: Andrii Nakryiko Date: Mon, 17 Jun 2019 12:26:50 -0700 Subject: 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 Acked-by: Song Liu Signed-off-by: Daniel Borkmann --- tools/lib/bpf/bpf_prog_linfo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tools/lib/bpf/bpf_prog_linfo.c') 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 #include #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; -- cgit v1.2.3