summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/lib/bpf/bpf_helpers.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
index c38d3774e328..ac03003896c3 100644
--- a/tools/lib/bpf/bpf_helpers.h
+++ b/tools/lib/bpf/bpf_helpers.h
@@ -3,6 +3,7 @@
#define __BPF_HELPERS__
+#include <linux/container_of.h>
#include <linux/NULL.h>
#include <linux/offsetof.h>
@@ -63,17 +64,6 @@
#endif
/*
- * Helper macros to manipulate data structures
- */
-#ifndef container_of
-#define container_of(ptr, type, member) \
- ({ \
- void *__mptr = (void *)(ptr); \
- ((type *)(__mptr - offsetof(type, member))); \
- })
-#endif
-
-/*
* Helper macro to throw a compilation error if __bpf_unreachable() gets
* built into the resulting code. This works given BPF back end does not
* implement __builtin_trap(). This is useful to assert that certain paths