From 51e5899395613031ad35b19297243dd7075683c8 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 12 Nov 2017 02:25:06 -0800 Subject: [PATCH] Fix compilation on more platforms --- src/cargo/core/shell.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/cargo/core/shell.rs b/src/cargo/core/shell.rs index a26fd6c2c63..ade08505d57 100644 --- a/src/cargo/core/shell.rs +++ b/src/cargo/core/shell.rs @@ -287,7 +287,7 @@ impl ColorChoice { } } -#[cfg(unix)] +#[cfg(any(target_os = "linux", target_os = "macos"))] mod imp { use std::mem; @@ -308,6 +308,13 @@ mod imp { } } +#[cfg(all(unix, not(any(target_os = "linux", target_os = "macos"))))] +mod imp { + pub fn stderr_width() -> Option { + None + } +} + #[cfg(windows)] mod imp { use std::mem;