-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
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
Optimize openssl
linkage
#200
base: master
Are you sure you want to change the base?
Conversation
Sorry for the code formating...
We should explicit import #[cfg(feature = "ssl")]
mod __make_openssl_linkage_work {
#[allow(unused_imports)]
use openssl_sys::*;
}
Delete these lines. Change to fn openssl_root_dir() -> Option<String> {
use std::ffi::OsString;
fn env_inner(name: &str) -> Option<OsString> {
let var = env::var_os(name);
println!("cargo:rerun-if-env-changed={}", name);
match var {
Some(ref v) => println!("{} = {}", name, v.to_string_lossy()),
None => println!("{} unset", name),
}
var
}
fn env(name: &str) -> Option<OsString> {
let prefix = env::var("TARGET").unwrap().to_uppercase().replace('-', "_");
let prefixed = format!("{}_{}", prefix, name);
env_inner(&prefixed).or_else(|| env_inner(name))
}
env("OPENSSL_INCLUDE_DIR").and_then(|path| {
Path::new(&path)
.parent()
.map(|path| path.display().to_string())
})
} |
Hey. Thanks for the PR! Unfortunately, since this is an Eclipse project, I won't be able to merge it unless you sign an Eclipse ECA. See here: But also... Please describe the specific problem which you are attempting to fix. On which platform(s). Also:
I know the build still needs work, but so far, every attempt to update it has broken at least on of these platforms. |
Sorry.....I have been busy recently.I haven't tested on Linux/MacOS yet. |
# Conflicts: # paho-mqtt-sys/build.rs
No description provided.