public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next] libbpf: fixed build error for samples/bpf/
@ 2018-04-20  8:05 Björn Töpel
  2018-04-20  8:13 ` Daniel Borkmann
  2018-04-20 15:59 ` Martin KaFai Lau
  0 siblings, 2 replies; 3+ messages in thread
From: Björn Töpel @ 2018-04-20  8:05 UTC (permalink / raw)
  To: ast, daniel, netdev; +Cc: Björn Töpel, Martin KaFai Lau

From: Björn Töpel <bjorn.topel@intel.com>

Commit 8a138aed4a80 ("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: Björn Töpel <bjorn.topel@intel.com>
---
 tools/lib/bpf/bpf.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h
index 01bda076310f..553b11ad52b3 100644
--- a/tools/lib/bpf/bpf.h
+++ b/tools/lib/bpf/bpf.h
@@ -24,6 +24,7 @@
 #define __BPF_BPF_H
 
 #include <linux/bpf.h>
+#include <stdbool.h>
 #include <stddef.h>
 
 struct bpf_create_map_attr {
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-20 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-20  8:05 [PATCH bpf-next] libbpf: fixed build error for samples/bpf/ Björn Töpel
2018-04-20  8:13 ` Daniel Borkmann
2018-04-20 15:59 ` Martin KaFai Lau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox