Skip to content

Commit c6ea443

Browse files
committed
Support crt-static in Redox
1 parent 173c5be commit c6ea443

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/redox/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,12 @@ extern {
377377
-> ::ssize_t;
378378
}
379379

380-
#[link(name = "c")]
381-
#[link(name = "m")]
380+
381+
#[cfg_attr(feature = "rustc-dep-of-std",
382+
link(name = "c", kind = "static",
383+
cfg(target_feature = "crt-static")))]
384+
#[cfg_attr(feature = "rustc-dep-of-std",
385+
link(name = "c", cfg(not(target_feature = "crt-static"))))]
382386
extern {}
383387

384388
pub use self::net::*;

0 commit comments

Comments
 (0)