提交 878a4d32 编写于 作者: B Björn Töpel 提交者: Daniel Borkmann

libbpf: fixed build error for samples/bpf/

Commit 8a138aed ("bpf: btf: Add BTF support to libbpf") did not
include stdbool.h, so GCC complained when building samples/bpf/.

In file included from /home/btopel/src/ext/linux/samples/bpf/libbpf.h:6:0,
                 from /home/btopel/src/ext/linux/samples/bpf/test_lru_dist.c:24:
/home/btopel/src/ext/linux/tools/lib/bpf/bpf.h:105:4: error: unknown type name ‘bool’; did you mean ‘_Bool’?
    bool do_log);
    ^~~~
    _Bool
Signed-off-by: NBjörn Töpel <bjorn.topel@intel.com>
Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
上级 34df9d37
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#define __BPF_BPF_H #define __BPF_BPF_H
#include <linux/bpf.h> #include <linux/bpf.h>
#include <stdbool.h>
#include <stddef.h> #include <stddef.h>
struct bpf_create_map_attr { struct bpf_create_map_attr {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册