aboutsummaryrefslogtreecommitdiff
path: root/ctru-sys
diff options
context:
space:
mode:
authorFenrir <[email protected]>2018-01-21 19:00:05 -0700
committerFenrirWolf <[email protected]>2018-01-21 19:16:33 -0700
commitd1475d0d2c2abadee8348cab67a9b6a8fd0a909a (patch)
treeba32a3bdbe25fd5b5f6de05334434eed02e0250f /ctru-sys
parentUpdate Travis for the latest nightly (diff)
downloadctru-rs-d1475d0d2c2abadee8348cab67a9b6a8fd0a909a.tar.xz
ctru-rs-d1475d0d2c2abadee8348cab67a9b6a8fd0a909a.zip
Ensure that the sysroot uses its own libc
Diffstat (limited to 'ctru-sys')
-rw-r--r--ctru-sys/Cargo.toml3
-rw-r--r--ctru-sys/src/lib.rs2
2 files changed, 5 insertions, 0 deletions
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");