Browse Source

Fix cfg flags for Redox

Jeremy Soller 9 years ago
parent
commit
0ac228d16d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/sys.rs

+ 2 - 2
src/sys.rs

@@ -36,10 +36,10 @@ impl Error {
 /// Cooperatively gives up a timeslice to the OS scheduler.
 pub fn yield_now() {
     unsafe {
-        #[cfg(unix)]
+        #[cfg(not(target_os = "redox"))]
         syscall!(SCHED_YIELD);
 
-        #[cfg(redox)]
+        #[cfg(target_os = "redox")]
         ::system::syscall::unix::sys_yield();
     }
 }