Skip to content

Commit

Permalink
Auto merge of #177 - antrik:fix-conditional-wait, r=emilio
Browse files Browse the repository at this point in the history
test.rs: Fix platform conditionals for `wait()`

The conditionals need to match those for `fork()`, since these two are
always used together. They got out of sync in
3e9aee8
  • Loading branch information
bors-servo authored Nov 5, 2017
2 parents c3fb5d7 + 98d53e0 commit b3dd16a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ use ipc::{self, IpcReceiverSet, IpcSender, IpcSharedMemory};
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
use ipc::IpcReceiver;
use router::ROUTER;
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
use libc;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::cell::RefCell;
use std::iter;
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
use std::ptr;
use std::sync::Arc;
use std::sync::mpsc::{self, Sender};
Expand All @@ -39,12 +41,12 @@ pub unsafe fn fork<F: FnOnce()>(child_func: F) -> libc::pid_t {
}
}

#[cfg(not(windows))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
pub trait Wait {
fn wait(self);
}

#[cfg(not(windows))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
impl Wait for libc::pid_t {
fn wait(self) {
unsafe {
Expand Down

0 comments on commit b3dd16a

Please sign in to comment.