Blob Blame History Raw
From aaa39601b756074e9ba8b9a607102a1ae0cb4c94 Mon Sep 17 00:00:00 2001
From: Jerome Marchand <jmarchan@redhat.com>
Date: Mon, 26 Jul 2021 14:45:37 +0200
Subject: [PATCH] Revert "libbpf-tools: remove unecessary custom NULL
 definitions"

Libbpf on RHEL does not define NULL
This reverts commit a9f461d74a84be2f96fd35c02cf98c7251bd4166.
---
 libbpf-tools/biostacks.bpf.c | 1 +
 libbpf-tools/xfsslower.bpf.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/libbpf-tools/biostacks.bpf.c b/libbpf-tools/biostacks.bpf.c
index f02a1ac5..6ed0bda6 100644
--- a/libbpf-tools/biostacks.bpf.c
+++ b/libbpf-tools/biostacks.bpf.c
@@ -9,6 +9,7 @@
 #include "maps.bpf.h"
 
 #define MAX_ENTRIES	10240
+#define NULL		0
 
 const volatile bool targ_ms = false;
 const volatile dev_t targ_dev = -1;
diff --git a/libbpf-tools/xfsslower.bpf.c b/libbpf-tools/xfsslower.bpf.c
index 05962f46..2b1c6e4b 100644
--- a/libbpf-tools/xfsslower.bpf.c
+++ b/libbpf-tools/xfsslower.bpf.c
@@ -6,6 +6,8 @@
 #include <bpf/bpf_tracing.h>
 #include "xfsslower.h"
 
+#define NULL	0
+
 const volatile pid_t targ_tgid = 0;
 const volatile __u64 min_lat = 0;
 
-- 
2.31.1