Skip to content

Commit

Permalink
Don't dynamic link to libnanomsg when using 'bundled' feature
Browse files Browse the repository at this point in the history
  • Loading branch information
wdv4758h committed Aug 22, 2016
1 parent 2a235bc commit c1e15a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions nanomsg_sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fn main() {
}

println!("cargo:rustc-link-search=native={}/lib", dst.display());
println!("cargo:rustc-link-search=native={}/lib64", dst.display());
}

#[cfg(not(feature = "bundled"))]
Expand Down
4 changes: 3 additions & 1 deletion nanomsg_sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ impl nn_pollfd {
}
}

#[link(name = "nanomsg")]
#[cfg_attr(all(target_os = "linux", feature = "bundled"), link(name = "anl"))]
#[cfg_attr(not(feature = "bundled"), link(name = "nanomsg"))]
#[cfg_attr(feature = "bundled", link(name = "nanomsg", kind = "static"))]
extern {
/// "Creates an SP socket with specified domain and protocol. Returns
/// a file descriptor for the newly created socket."
Expand Down

0 comments on commit c1e15a7

Please sign in to comment.