Fix compilation on more platforms
authorAlex Crichton <alex@alexcrichton.com>
Sun, 12 Nov 2017 10:25:06 +0000 (02:25 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 12 Nov 2017 10:25:06 +0000 (02:25 -0800)
src/cargo/core/shell.rs

index a26fd6c2c632fc6503d8fc43c26b6a27f29b37ae..ade08505d57188f2f8820d8dd7be9b7a634b6844 100644 (file)
@@ -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<usize> {
+        None
+    }
+}
+
 #[cfg(windows)]
 mod imp {
     use std::mem;