@@ -297,8 +297,11 @@ cfg_if! {
297
297
if #[ cfg( target_os = "l4re" ) ] {
298
298
// required libraries for L4Re are linked externally, ATM
299
299
} else if #[ cfg( feature = "std" ) ] {
300
- // cargo build, don't pull in anything extra as the libstd dep
301
- // already pulls in all libs.
300
+ // cargo build. Most libraries are already pulled in by libstd dep
301
+ #[ cfg_attr(
302
+ any( target_os = "macos" , target_os = "ios" ) ,
303
+ link( name = "iconv" ) ) ]
304
+ extern { }
302
305
} else if #[ cfg( all( target_os = "linux" ,
303
306
target_env = "gnu" ,
304
307
feature = "rustc-dep-of-std" ) ) ] {
@@ -1544,20 +1547,17 @@ extern "C" {
1544
1547
len : :: off_t ,
1545
1548
) -> :: c_int ;
1546
1549
1547
- #[ cfg_attr( target_os = "macos" , link( name = "iconv" ) ) ]
1548
1550
pub fn iconv_open (
1549
1551
tocode : * const :: c_char ,
1550
1552
fromcode : * const :: c_char ,
1551
1553
) -> iconv_t ;
1552
- #[ cfg_attr( target_os = "macos" , link( name = "iconv" ) ) ]
1553
1554
pub fn iconv (
1554
1555
cd : iconv_t ,
1555
1556
inbuf : * mut * mut :: c_char ,
1556
1557
inbytesleft : * mut :: size_t ,
1557
1558
outbuf : * mut * mut :: c_char ,
1558
1559
outbytesleft : * mut :: size_t ,
1559
1560
) -> :: size_t ;
1560
- #[ cfg_attr( target_os = "macos" , link( name = "iconv" ) ) ]
1561
1561
pub fn iconv_close ( cd : iconv_t ) -> :: c_int ;
1562
1562
}
1563
1563
0 commit comments