diff options
| author | Fenrir <[email protected]> | 2018-01-21 19:00:05 -0700 |
|---|---|---|
| committer | FenrirWolf <[email protected]> | 2018-01-21 19:16:33 -0700 |
| commit | d1475d0d2c2abadee8348cab67a9b6a8fd0a909a (patch) | |
| tree | ba32a3bdbe25fd5b5f6de05334434eed02e0250f | |
| parent | Update Travis for the latest nightly (diff) | |
| download | ctru-rs-d1475d0d2c2abadee8348cab67a9b6a8fd0a909a.tar.xz ctru-rs-d1475d0d2c2abadee8348cab67a9b6a8fd0a909a.zip | |
Ensure that the sysroot uses its own libc
| -rw-r--r-- | ctr-std/Cargo.toml | 5 | ||||
| -rw-r--r-- | ctru-sys/Cargo.toml | 3 | ||||
| -rw-r--r-- | ctru-sys/src/lib.rs | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/ctr-std/Cargo.toml b/ctr-std/Cargo.toml index be1717f..e41e2eb 100644 --- a/ctr-std/Cargo.toml +++ b/ctr-std/Cargo.toml @@ -9,12 +9,9 @@ git = "https://github.com/rust-lang-nursery/compiler-builtins" [dependencies.alloc_system] git = "https://github.com/rust3ds/alloc_system3ds" -[dependencies.libc] -version = "0.2" -default-features = false - [dependencies.ctru-sys] path = "../ctru-sys" +default-features = false features = ["stdbuild"] [features] diff --git a/ctru-sys/Cargo.toml b/ctru-sys/Cargo.toml index 7dd0b02..4d1d0cf 100644 --- a/ctru-sys/Cargo.toml +++ b/ctru-sys/Cargo.toml @@ -7,8 +7,11 @@ license = "https://en.wikipedia.org/wiki/Zlib_License" [dependencies.libc] version = "0.2" default-features = false +optional = true [features] +default = ["libc"] + # This is a dummy feature that only exists to work around a Xargo issue. # User code should not enable it. stdbuild = [] diff --git a/ctru-sys/src/lib.rs b/ctru-sys/src/lib.rs index 053d86d..4b40a5c 100644 --- a/ctru-sys/src/lib.rs +++ b/ctru-sys/src/lib.rs @@ -7,6 +7,8 @@ #![no_std] +#![cfg_attr(feature = "stdbuild", feature(libc))] + extern crate libc; include!("bindings.rs"); |