Skip to content

Commit 9ed04fe

Browse files
committed
Link to librt on non-apple platforms
1 parent 8531cc1 commit 9ed04fe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/unix/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,14 @@ cfg_if! {
105105
} else if #[cfg(target_env = "musl")] {
106106
#[link(name = "c", kind = "static")]
107107
extern {}
108+
} else if #[cfg(any(target_os = "macos", target_os = "ios"))] {
109+
#[link(name = "c")]
110+
#[link(name = "m")]
111+
extern {}
108112
} else {
109113
#[link(name = "c")]
110114
#[link(name = "m")]
115+
#[link(name = "rt")]
111116
extern {}
112117
}
113118
}

0 commit comments

Comments
 (0)