Skip to content

Commit e5b0863

Browse files
rdnaborkmann
authored andcommitted
libbpf: Use __u32 instead of u32 in bpf_program__load
Make bpf_program__load consistent with other interfaces: use __u32 instead of u32. That in turn fixes build of samples: In file included from ./samples/bpf/trace_output_user.c:21:0: ./tools/lib/bpf/libbpf.h:132:9: error: unknown type name ‘u32’ u32 kern_version); ^ Fixes: commit 29cd77f ("libbpf: Support loading individual progs") Signed-off-by: Andrey Ignatov <rdna@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent eff8190 commit e5b0863

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/lib/bpf/libbpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ load_program(enum bpf_prog_type type, enum bpf_attach_type expected_attach_type,
13791379

13801380
int
13811381
bpf_program__load(struct bpf_program *prog,
1382-
char *license, u32 kern_version)
1382+
char *license, __u32 kern_version)
13831383
{
13841384
int err = 0, fd, i;
13851385

tools/lib/bpf/libbpf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void bpf_program__set_ifindex(struct bpf_program *prog, __u32 ifindex);
129129
const char *bpf_program__title(struct bpf_program *prog, bool needs_copy);
130130

131131
int bpf_program__load(struct bpf_program *prog, char *license,
132-
u32 kern_version);
132+
__u32 kern_version);
133133
int bpf_program__fd(struct bpf_program *prog);
134134
int bpf_program__pin_instance(struct bpf_program *prog, const char *path,
135135
int instance);

0 commit comments

Comments
 (0)