Skip to content

Commit 51cc6cc

Browse files
committed
Auto merge of #249 - alexcrichton:fix-link, r=alexcrichton
Link to libraries when disabling `use_std` This crate currently relies on libraries being linked to come from libstd, but if `use_std` is disabled that's not true! In that case we need to pull in the libraries ourselves. Closes rust-lang/rust#32661
2 parents dfc1ab5 + 918e8b4 commit 51cc6cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unix/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub const IF_NAMESIZE: ::size_t = 16;
143143
pub const RTLD_LAZY: ::c_int = 0x1;
144144

145145
cfg_if! {
146-
if #[cfg(not(stdbuild))] {
146+
if #[cfg(all(not(stdbuild), feature = "use_std"))] {
147147
// cargo build, don't pull in anything extra as the libstd dep
148148
// already pulls in all libs.
149149
} else if #[cfg(all(target_env = "musl", not(any(target_arch = "mips",

0 commit comments

Comments
 (0)