]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
libbpf: Use __u32 instead of u32 in bpf_program__load
authorAndrey Ignatov <rdna@fb.com>
Wed, 3 Oct 2018 22:26:43 +0000 (15:26 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 4 Oct 2018 14:04:16 +0000 (16:04 +0200)
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 29cd77f41620d ("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>
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h

index 02888d36b805fe69747ec57ce0d7aa5cca01071d..85de1ebd4cb01a672f4a2e41ba82893f9f62a588 100644 (file)
@@ -1379,7 +1379,7 @@ out:
 
 int
 bpf_program__load(struct bpf_program *prog,
-                 char *license, u32 kern_version)
+                 char *license, __u32 kern_version)
 {
        int err = 0, fd, i;
 
index 28f83dd6022b31b974e5a886eb5690e4a247b506..fbfc2aec0f0de779b956a1416b87786dcfc3f54b 100644 (file)
@@ -129,7 +129,7 @@ void bpf_program__set_ifindex(struct bpf_program *prog, __u32 ifindex);
 const char *bpf_program__title(struct bpf_program *prog, bool needs_copy);
 
 int bpf_program__load(struct bpf_program *prog, char *license,
-                     u32 kern_version);
+                     __u32 kern_version);
 int bpf_program__fd(struct bpf_program *prog);
 int bpf_program__pin_instance(struct bpf_program *prog, const char *path,
                              int instance);