// second copies of everything. We obviously don't want this, so instead of
// dying horribly during testing, we allow all of the test rustuv's references
// to get resolved to the original rustuv crate.
-#[link_args = "-luv_support -luv"]
#[cfg(not(test))]
+#[link(name = "uv_support", kind = "static")]
+#[link(name = "uv", kind = "static")]
extern {}
extern {
pub fn uv_signal_stop(handle: *uv_signal_t) -> c_int;
}
-// libuv requires various system libraries to successfully link on some
-// platforms
-#[cfg(target_os = "linux")]
-#[link_args = "-lpthread"]
+// libuv requires other native libraries on various platforms. These are all
+// listed here (for each platform)
+
+#[cfg(not(target_os = "android"))] // apparently pthreads isn't on android?
+#[link(name = "pthread")]
extern {}
#[cfg(target_os = "win32")]
-#[link_args = "-lWs2_32 -lpsapi -liphlpapi"]
+#[link(name = "ws2_32")]
+#[link(name = "psapi")]
+#[link(name = "iphlpapi")]
+extern {}
+
+#[cfg(target_os = "freebsd")]
+#[link(name = "kvm")]
extern {}