From c23a457e72abe608715ac76f076f47dc42af07a5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:44 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/openssl-sys/build/expando.c | 4 ++++ vendor/openssl-sys/build/find_normal.rs | 21 ++++++++++----------- vendor/openssl-sys/build/main.rs | 1 - vendor/openssl-sys/build/run_bindgen.rs | 4 ++++ 4 files changed, 18 insertions(+), 12 deletions(-) (limited to 'vendor/openssl-sys/build') diff --git a/vendor/openssl-sys/build/expando.c b/vendor/openssl-sys/build/expando.c index 5d003d902..cd7456b4f 100644 --- a/vendor/openssl-sys/build/expando.c +++ b/vendor/openssl-sys/build/expando.c @@ -111,6 +111,10 @@ RUST_CONF_OPENSSL_NO_SSL3_METHOD RUST_CONF_OPENSSL_NO_TLSEXT #endif +#ifdef OPENSSL_NO_SOCK +RUST_CONF_OPENSSL_NO_SOCK +#endif + #ifdef OPENSSL_NO_STDIO RUST_CONF_OPENSSL_NO_STDIO #endif diff --git a/vendor/openssl-sys/build/find_normal.rs b/vendor/openssl-sys/build/find_normal.rs index 791fc3398..4d461039c 100644 --- a/vendor/openssl-sys/build/find_normal.rs +++ b/vendor/openssl-sys/build/find_normal.rs @@ -92,8 +92,8 @@ fn find_openssl_dir(target: &str) -> OsString { try_pkg_config(); try_vcpkg(); - // FreeBSD ships with OpenSSL but doesn't include a pkg-config file :( - if host == target && target.contains("freebsd") { + // FreeBSD and OpenBSD ship with Libre|OpenSSL but don't include a pkg-config file + if host == target && (target.contains("freebsd") || target.contains("openbsd")) { return OsString::from("/usr"); } @@ -198,13 +198,11 @@ fn try_pkg_config() { let target = env::var("TARGET").unwrap(); let host = env::var("HOST").unwrap(); - // If we're going to windows-gnu we can use pkg-config, but only so long as - // we're coming from a windows host. - // - // Otherwise if we're going to windows we probably can't use pkg-config. + // FIXME we really shouldn't be automatically enabling this if target.contains("windows-gnu") && host.contains("windows") { env::set_var("PKG_CONFIG_ALLOW_CROSS", "1"); - } else if target.contains("windows") { + } else if target.contains("windows-msvc") { + // MSVC targets use vcpkg instead. return; } @@ -232,8 +230,12 @@ fn try_pkg_config() { /// /// Note that if this succeeds then the function does not return as vcpkg /// should emit all of the cargo metadata that we need. -#[cfg(target_env = "msvc")] fn try_vcpkg() { + let target = env::var("TARGET").unwrap(); + if !target.contains("windows") { + return; + } + // vcpkg will not emit any metadata if it can not find libraries // appropriate for the target triple with the desired linkage. @@ -257,9 +259,6 @@ fn try_vcpkg() { process::exit(0); } -#[cfg(not(target_env = "msvc"))] -fn try_vcpkg() {} - fn execute_command_and_get_output(cmd: &str, args: &[&str]) -> Option { let out = Command::new(cmd).args(args).output(); if let Ok(ref r1) = out { diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs index 3359165a3..21ccf3d03 100644 --- a/vendor/openssl-sys/build/main.rs +++ b/vendor/openssl-sys/build/main.rs @@ -4,7 +4,6 @@ extern crate cc; #[cfg(feature = "vendored")] extern crate openssl_src; extern crate pkg_config; -#[cfg(target_env = "msvc")] extern crate vcpkg; use std::collections::HashSet; diff --git a/vendor/openssl-sys/build/run_bindgen.rs b/vendor/openssl-sys/build/run_bindgen.rs index 5d307503f..1eeaad225 100644 --- a/vendor/openssl-sys/build/run_bindgen.rs +++ b/vendor/openssl-sys/build/run_bindgen.rs @@ -55,6 +55,10 @@ const INCLUDES: &str = " #if OPENSSL_VERSION_NUMBER >= 0x30000000 #include #endif + +#if defined(LIBRESSL_VERSION_NUMBER) || defined(OPENSSL_IS_BORINGSSL) +#include +#endif "; #[cfg(feature = "bindgen")] -- cgit v1.2.3