From 4fcb1d75b99d8c8039ba870093901d057faf5194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alessandro=C2=A0Decina?= Date: Sun, 29 Aug 2021 08:37:16 +0000 Subject: [PATCH] aya-gen: bump bindgen to 0.59 --- aya-gen/Cargo.toml | 4 ++-- aya-gen/src/btf_types.rs | 2 +- xtask/src/codegen/aya.rs | 10 +++++----- xtask/src/codegen/aya_bpf_bindings.rs | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/aya-gen/Cargo.toml b/aya-gen/Cargo.toml index ed1a3814..d5facdf5 100644 --- a/aya-gen/Cargo.toml +++ b/aya-gen/Cargo.toml @@ -5,11 +5,11 @@ authors = ["Alessandro Decina "] edition = "2018" [dependencies] -bindgen = "0.57" +bindgen = "0.59" structopt = {version = "0.3", default-features = false } anyhow = "1" thiserror = "1" syn = "1" quote = "1" proc-macro2 = "1" -indexmap = "1.6" \ No newline at end of file +indexmap = "1.6" diff --git a/aya-gen/src/btf_types.rs b/aya-gen/src/btf_types.rs index e5ece897..39891b38 100644 --- a/aya-gen/src/btf_types.rs +++ b/aya-gen/src/btf_types.rs @@ -34,7 +34,7 @@ pub fn generate>( bindgen = bindgen.header_contents("kernel_types.h", &c_header); for ty in types { - bindgen = bindgen.whitelist_type(ty); + bindgen = bindgen.allowlist_type(ty); } let bindings = bindgen.generate().or(Err(Error::Bindgen))?.to_string(); diff --git a/xtask/src/codegen/aya.rs b/xtask/src/codegen/aya.rs index 5a3e080c..b92737b5 100644 --- a/xtask/src/codegen/aya.rs +++ b/xtask/src/codegen/aya.rs @@ -40,7 +40,7 @@ fn codegen_internal_btf_bindings(opts: &Options) -> Result<(), anyhow::Error> { let types = ["bpf_core_relo", "btf_ext_header"]; for x in &types { - bindgen = bindgen.whitelist_type(x); + bindgen = bindgen.allowlist_type(x); } let bindings = bindgen @@ -154,10 +154,10 @@ fn codegen_bindings(opts: &Options) -> Result<(), anyhow::Error> { let mut bindgen = builder(); for x in &types { - bindgen = bindgen.whitelist_type(x); + bindgen = bindgen.allowlist_type(x); } for x in &vars { - bindgen = bindgen.whitelist_var(x); + bindgen = bindgen.allowlist_var(x); } // FIXME: this stuff is probably debian/ubuntu specific @@ -174,11 +174,11 @@ fn codegen_bindings(opts: &Options) -> Result<(), anyhow::Error> { }; for x in &types { - bindgen = bindgen.whitelist_type(x); + bindgen = bindgen.allowlist_type(x); } for x in &vars { - bindgen = bindgen.whitelist_var(x); + bindgen = bindgen.allowlist_var(x); } let bindings = bindgen diff --git a/xtask/src/codegen/aya_bpf_bindings.rs b/xtask/src/codegen/aya_bpf_bindings.rs index 20cd2262..b796a824 100644 --- a/xtask/src/codegen/aya_bpf_bindings.rs +++ b/xtask/src/codegen/aya_bpf_bindings.rs @@ -55,15 +55,15 @@ pub fn codegen(opts: &Options) -> Result<(), anyhow::Error> { let vars = ["BPF_.*", "bpf_.*", "TC_ACT_.*", "SOL_SOCKET", "SO_.*"]; for x in &types { - bindgen = bindgen.whitelist_type(x); + bindgen = bindgen.allowlist_type(x); } // we define our own version which is compatible with both libbpf and // iproute2 - bindgen = bindgen.blacklist_type("bpf_map_def"); + bindgen = bindgen.blocklist_type("bpf_map_def"); for x in &vars { - bindgen = bindgen.whitelist_var(x); + bindgen = bindgen.allowlist_var(x); } bindgen