Auto merge of #31532 - tomaka:fix-emscripten, r=brson
Before this PR: > test result: FAILED. 2039 passed; 327 failed; 2 ignored; 0 measured After: > test result: FAILED. 2232 passed; 134 failed; 2 ignored; 0 measured r? @brson
This commit is contained in:
@@ -51,14 +51,14 @@ impl FileDesc {
|
||||
Ok(ret as usize)
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_env = "newlib", target_os = "solaris")))]
|
||||
#[cfg(not(any(target_env = "newlib", target_os = "solaris", target_os = "emscripten")))]
|
||||
pub fn set_cloexec(&self) {
|
||||
unsafe {
|
||||
let ret = libc::ioctl(self.fd, libc::FIOCLEX);
|
||||
debug_assert_eq!(ret, 0);
|
||||
}
|
||||
}
|
||||
#[cfg(any(target_env = "newlib", target_os = "solaris"))]
|
||||
#[cfg(any(target_env = "newlib", target_os = "solaris", target_os = "emscripten"))]
|
||||
pub fn set_cloexec(&self) {
|
||||
unsafe {
|
||||
let previous = libc::fcntl(self.fd, libc::F_GETFD);
|
||||
|
||||
Reference in New Issue
Block a user