Skip to content

Commit b3dd16a

Browse files
author
bors-servo
authored
Auto merge of #177 - antrik:fix-conditional-wait, r=emilio
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
2 parents c3fb5d7 + 98d53e0 commit b3dd16a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ use ipc::{self, IpcReceiverSet, IpcSender, IpcSharedMemory};
1111
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
1212
use ipc::IpcReceiver;
1313
use router::ROUTER;
14+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
1415
use libc;
1516
use serde::{Deserialize, Deserializer, Serialize, Serializer};
1617
use std::cell::RefCell;
1718
use std::iter;
19+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
1820
use std::ptr;
1921
use std::sync::Arc;
2022
use std::sync::mpsc::{self, Sender};
@@ -39,12 +41,12 @@ pub unsafe fn fork<F: FnOnce()>(child_func: F) -> libc::pid_t {
3941
}
4042
}
4143

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

47-
#[cfg(not(windows))]
49+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
4850
impl Wait for libc::pid_t {
4951
fn wait(self) {
5052
unsafe {

0 commit comments

Comments
 (0)