Skip to content

Commit 68a5c44

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

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: rust
22
sudo: required
3+
dist: trusty
34
rust:
45
- 1.0.0
56
- beta

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)