From 355301417300e33fd48571f4c0248c7f5db9254c Mon Sep 17 00:00:00 2001 From: Alexander Batischev Date: Mon, 18 Jan 2021 20:56:28 +0300 Subject: [PATCH] Pull extra dep --- src/unix/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/unix/mod.rs b/src/unix/mod.rs index bb867609c75c5..0028cc918b57e 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -297,8 +297,11 @@ cfg_if! { if #[cfg(target_os = "l4re")] { // required libraries for L4Re are linked externally, ATM } else if #[cfg(feature = "std")] { - // cargo build, don't pull in anything extra as the libstd dep - // already pulls in all libs. + // cargo build. Most libraries are already pulled in by libstd dep + #[cfg_attr( + any(target_os = "macos", target_os = "ios"), + link(name = "iconv"))] + extern {} } else if #[cfg(all(target_os = "linux", target_env = "gnu", feature = "rustc-dep-of-std"))] { @@ -1544,12 +1547,10 @@ extern "C" { len: ::off_t, ) -> ::c_int; - #[cfg_attr(target_os = "macos", link(name = "iconv"))] pub fn iconv_open( tocode: *const ::c_char, fromcode: *const ::c_char, ) -> iconv_t; - #[cfg_attr(target_os = "macos", link(name = "iconv"))] pub fn iconv( cd: iconv_t, inbuf: *mut *mut ::c_char, @@ -1557,7 +1558,6 @@ extern "C" { outbuf: *mut *mut ::c_char, outbytesleft: *mut ::size_t, ) -> ::size_t; - #[cfg_attr(target_os = "macos", link(name = "iconv"))] pub fn iconv_close(cd: iconv_t) -> ::c_int; }