Explorar el Código

Fix cfg flags for Redox

Jeremy Soller hace 9 años
padre
commit
0ac228d16d
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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();
     }
 }