From 420cda24c57a8ac01db657dcb464f5f0bdcf0f33 Mon Sep 17 00:00:00 2001 From: Brenden Blanco Date: Sun, 1 May 2016 21:24:29 -0700 Subject: [PATCH] skip include of kernel bpf.h in test, forward declare instead --- tests/python/test_histogram.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/python/test_histogram.py b/tests/python/test_histogram.py index b76ab07..27425e0 100755 --- a/tests/python/test_histogram.py +++ b/tests/python/test_histogram.py @@ -12,7 +12,7 @@ class TestHistogram(TestCase): def test_simple(self): b = BPF(text=""" #include -#include +struct bpf_map; BPF_HISTOGRAM(hist1); BPF_HASH(stub); int kprobe__htab_map_delete_elem(struct pt_regs *ctx, struct bpf_map *map, u64 *k) { @@ -35,7 +35,7 @@ int kprobe__htab_map_delete_elem(struct pt_regs *ctx, struct bpf_map *map, u64 * def test_struct(self): b = BPF(text=""" #include -#include +struct bpf_map; typedef struct { void *map; u64 slot; } Key; BPF_HISTOGRAM(hist1, Key, 1024); BPF_HASH(stub1); -- 2.7.4