Blob Blame History Raw
From d25f87677b554d9cbdc609c020a2baa59e442443 Mon Sep 17 00:00:00 2001
From: Jerome Marchand <jmarchan@redhat.com>
Date: Wed, 2 Jun 2021 10:57:43 +0200
Subject: [PATCH] Define missing BPF_* macros

We're currently missing BPF_MAP_TYPE_TASK_STORAGE.  This could be
fixed by a future rebase. In the mean time, let's have a temporary
fix.

diff --git a/introspection/bps.c b/introspection/bps.c
index 0eae675e..1108e417 100644
--- a/introspection/bps.c
+++ b/introspection/bps.c
@@ -49,6 +49,10 @@ static const char * const prog_type_strings[] = {
   [BPF_PROG_TYPE_SK_LOOKUP] = "sk_lookup",
 };
 
+#ifndef BPF_MAP_TYPE_TASK_STORAGE
+#define BPF_MAP_TYPE_TASK_STORAGE  (BPF_MAP_TYPE_INODE_STORAGE + 1)
+#endif
+
 static const char * const map_type_strings[] = {
   [BPF_MAP_TYPE_UNSPEC] = "unspec",
   [BPF_MAP_TYPE_HASH] = "hash",
-- 
2.31.1