Skip to content

Commit 4bf2043

Browse files
committed
examples: include common.h in bpf_helpers.h
clang-format re-orders common.h to be included after bpf_helper_defs.h, which is not possible due to the latter depending on __u64. Include common.h at the start of bpf_helpers.h instead. Signed-off-by: Timo Beckers <timo@isovalent.com>
1 parent 66dd1ec commit 4bf2043

File tree

4 files changed

+1
-3
lines changed

4 files changed

+1
-3
lines changed

examples/cgroup_skb/cgroup_skb.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// +build ignore
22

3-
#include "common.h"
43
#include "bpf_helpers.h"
54

65
char __license[] SEC("license") = "Dual MIT/GPL";

examples/headers/bpf_helpers.h

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* in advance since bpf_helper_defs.h uses such types
99
* as __u64.
1010
*/
11+
#include "common.h"
1112
#include "bpf_helper_defs.h"
1213

1314
#define __uint(name, val) int (*name)[val]

examples/kprobe/kprobe.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// +build ignore
22

3-
#include "common.h"
43
#include "bpf_helpers.h"
54

65
char __license[] SEC("license") = "Dual MIT/GPL";

examples/kprobepin/kprobe_pin.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// +build ignore
22

3-
#include "common.h"
43
#include "bpf_helpers.h"
54

65
char __license[] SEC("license") = "Dual MIT/GPL";

0 commit comments

Comments
 (0)