We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
struct pf_addr_wrap { union { struct { struct pf_addr addr; struct pf_addr mask; } a; char ifname[IFNAMSIZ]; char tblname[PF_TABLE_NAME_SIZE]; char rtlabelname[RTLABEL_LEN]; u_int32_t rtlabel; } v; union { #ifdef KERNEL struct pfi_dynaddr *dyn __attribute__((aligned(8))); struct pfr_ktable *tbl __attribute__((aligned(8))); #else /* !KERNEL */ void *dyn __attribute__((aligned(8))); void *tbl __attribute__((aligned(8))); #endif /* !KERNEL */ int dyncnt __attribute__((aligned(8))); int tblcnt __attribute__((aligned(8))); } p __attribute__((aligned(8))); u_int8_t type; /* PF_ADDR_* */ u_int8_t iflags; /* PFI_AFLAG_* */ };
bindgen::Builder::default() .header("input.h") .generate() .unwrap()
or
$ bindgen input.h --whatever --flags
error: expected identifier, found keyword `dyn` --> src/ffi/pfvar.rs:581:9 | 581 | pub dyn: *mut ::std::os::raw::c_void, | ^^^ expected identifier, found keyword | help: you can escape reserved keywords to use them as identifiers | 581 | pub r#dyn: *mut ::std::os::raw::c_void, | ^^^^^ error: unions cannot have zero fields --> src/ffi/pfvar.rs:580:1 | 580 | / pub union pf_addr_wrap__bindgen_ty_2 { 581 | | pub dyn: *mut ::std::os::raw::c_void, 582 | | pub tbl: *mut ::std::os::raw::c_void, 583 | | pub dyncnt: ::std::os::raw::c_int, 584 | | pub tblcnt: ::std::os::raw::c_int, 585 | | _bindgen_union_align: u64, 586 | | } | |_^
and/or
// Insert the (incorrect/buggy) generated bindings here
Insert compilation errors generated when compiling the bindings with rustc here
The text was updated successfully, but these errors were encountered:
context: Escape the dyn keyword properly.
f762735
Fixes #1946
c426ae7
Nice catch, easy enough :)
#1951
Sorry, something went wrong.
98841b3
Successfully merging a pull request may close this issue.
Input C/C++ Header
Bindgen Invocation
or
Actual Results
and/or
// Insert the (incorrect/buggy) generated bindings here
and/or
Expected Results
The text was updated successfully, but these errors were encountered: