about summary refs log tree commit diff
diff options
context:
space:
mode:
authorslo1 <26316200+slo1@users.noreply.github.com>2021-01-15 10:53:50 -0800
committerslo1 <26316200+slo1@users.noreply.github.com>2021-01-21 22:42:38 -0800
commit23f93143271815aee3290a70a929327d60b68fc1 (patch)
treed2b008bd026bd5f2fe2abf307857ee1f62f7f582
parent41e6b23000b41ad52ea3c0f0e9ad4791d24281a4 (diff)
downloadrust-23f93143271815aee3290a70a929327d60b68fc1.tar.gz
rust-23f93143271815aee3290a70a929327d60b68fc1.zip
Update src/test/ui/command/command-setgroups.rs
Co-authored-by: Ashley Mannix <kodraus@hey.com>
-rw-r--r--src/test/ui/command/command-setgroups.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/command/command-setgroups.rs b/src/test/ui/command/command-setgroups.rs
index 978c9c44486..3850f038442 100644
--- a/src/test/ui/command/command-setgroups.rs
+++ b/src/test/ui/command/command-setgroups.rs
@@ -11,6 +11,12 @@ use std::process::Command;
 use std::os::unix::process::CommandExt;
 
 fn main() {
+    #[cfg(unix)]
+    run()
+}
+
+#[cfg(unix)]
+fn run() {
     let max_ngroups = unsafe { libc::sysconf(libc::_SC_NGROUPS_MAX) };
     let max_ngroups = max_ngroups as u32 + 1;
     let vec: Vec<u32> = (0..max_ngroups).collect();