From 95809ae98e1da102a3d369f30a6d67eb88b4cd91 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sat, 7 Dec 2019 19:01:41 -0600 Subject: [PATCH] Add 'windows_legacy' feature to allow build for older windows versions --- Cargo.toml | 9 +++++++++ build.rs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 11ee4081b..c4507d9f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,6 +39,15 @@ unix = [ "generic" ] windows = ["generic"] +windows_legacy = [ + "arch", + "nproc", + "sync", + "touch", + "whoami", + + "redox_generic" + ] # Feature "fuchsia" contains the exclusive list of utilities # that can be compiled and run on Fuchsia. Should be built # with --no-default-features when selecting this feature. diff --git a/build.rs b/build.rs index b5b70c019..124189839 100644 --- a/build.rs +++ b/build.rs @@ -16,7 +16,7 @@ pub fn main() { if val == "1" && key.starts_with(feature_prefix) { let krate = key[feature_prefix.len()..].to_lowercase(); match krate.as_ref() { - "default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" | "windows" + "default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" | "windows" | "windows_legacy" | "nightly" | "test_unimplemented" => continue, _ => {} }