Skip to content

Commit

Permalink
Merge pull request #1948 from alex/boringssl-warnings
Browse files Browse the repository at this point in the history
Fix warnings from BoringSSL on Rust 1.70
  • Loading branch information
sfackler committed Jun 4, 2023
2 parents 4b4a344 + 90d9199 commit 9ef1fe3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions openssl-sys/build/run_bindgen.rs
Expand Up @@ -110,11 +110,15 @@ pub fn run_boringssl(include_dirs: &[PathBuf]) {
let mut builder = bindgen::builder()
.rust_target(RustTarget::Stable_1_47)
.ctypes_prefix("::libc")
.raw_line("use libc::*;")
.derive_default(false)
.enable_function_attribute_detection()
.default_macro_constant_type(MacroTypeVariation::Signed)
.rustified_enum("point_conversion_form_t")
.allowlist_file(".*/openssl/[^/]+\\.h")
.allowlist_recursively(false)
.blocklist_function("BIO_vsnprintf")
.blocklist_function("OPENSSL_vasprintf")
.wrap_static_fns(true)
.wrap_static_fns_path(out_dir.join("boring_static_wrapper").display().to_string())
.layout_tests(false)
Expand Down Expand Up @@ -165,11 +169,15 @@ pub fn run_boringssl(include_dirs: &[PathBuf]) {
.arg(out_dir.join("bindgen.rs"))
.arg("--rust-target=1.47")
.arg("--ctypes-prefix=::libc")
.arg("--raw-line=use libc::*;")
.arg("--no-derive-default")
.arg("--enable-function-attribute-detection")
.arg("--default-macro-constant-type=signed")
.arg("--rustified-enum=point_conversion_form_t")
.arg("--allowlist-file=.*/openssl/[^/]+\\.h")
.arg("--no-recursive-allowlist")
.arg("--blocklist-function=BIO_vsnprintf")
.arg("--blocklist-function=OPENSSL_vasprintf")
.arg("--experimental")
.arg("--wrap-static-fns")
.arg("--wrap-static-fns-path")
Expand Down
1 change: 1 addition & 0 deletions openssl-sys/src/lib.rs
Expand Up @@ -10,6 +10,7 @@
overflowing_literals,
unused_imports
)]
#![cfg_attr(feature = "unstable_boringssl", allow(ambiguous_glob_reexports))]
#![doc(html_root_url = "https://docs.rs/openssl-sys/0.9")]
#![recursion_limit = "128"] // configure fixed limit across all rust versions

Expand Down

0 comments on commit 9ef1fe3

Please sign in to comment.