aya-gen: bump bindgen to 0.59

pull/58/head
Alessandro Decina 3 years ago committed by Alessandro Decina
parent 9c27910f76
commit 4fcb1d75b9

@ -5,11 +5,11 @@ authors = ["Alessandro Decina <alessandro.d@gmail.com>"]
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"
indexmap = "1.6"

@ -34,7 +34,7 @@ pub fn generate<T: AsRef<str>>(
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();

@ -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

@ -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

Loading…
Cancel
Save