Link to librt on non-apple platforms
diff --git a/.travis.yml b/.travis.yml
index c53fcf1..fab85e7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,6 @@
language: rust
sudo: required
+dist: trusty
rust:
- 1.0.0
- beta
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 93dd856..3dc7f62 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -105,9 +105,14 @@
} else if #[cfg(target_env = "musl")] {
#[link(name = "c", kind = "static")]
extern {}
+ } else if #[cfg(any(target_os = "macos", target_os = "ios"))] {
+ #[link(name = "c")]
+ #[link(name = "m")]
+ extern {}
} else {
#[link(name = "c")]
#[link(name = "m")]
+ #[link(name = "rt")]
extern {}
}
}