test --no-default-features and fix musl builds
diff --git a/appveyor.yml b/appveyor.yml
index 07ac4a9..fe2a332 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -24,4 +24,5 @@
test_script:
- cargo test --target %TARGET%
+ - cargo test --no-default-features --target %TARGET%
- cargo test --manifest-path libc-test/Cargo.toml --target %TARGET%
diff --git a/ci/run.sh b/ci/run.sh
index 02dd35a..2a7b400 100755
--- a/ci/run.sh
+++ b/ci/run.sh
@@ -79,4 +79,5 @@
opt="--release"
fi
+exec cargo test $opt --no-default-features --target $TARGET
exec cargo test $opt --manifest-path libc-test/Cargo.toml --target $TARGET
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 0d344ed..fc19241 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -277,8 +277,8 @@
// cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs.
} else if #[cfg(target_env = "musl")] {
- #[link(name = "c", kind = "static", cfg(target_feature = "crt-static"))]
- #[link(name = "c", cfg(not(target_feature = "crt-static")))]
+ #[cfg_attr(feature = "stdbuild", link(name = "c", kind = "static", cfg(target_feature = "crt-static")))]
+ #[cfg_attr(feature = "stdbuild", link(name = "c", cfg(not(target_feature = "crt-static"))))]
extern {}
} else if #[cfg(target_os = "emscripten")] {
#[link(name = "c")]