aboutsummaryrefslogtreecommitdiff
path: root/ctr-std
diff options
context:
space:
mode:
authorFenrir <[email protected]>2018-02-11 15:51:57 -0700
committerFenrirWolf <[email protected]>2018-02-11 16:34:51 -0700
commit48ee173596fe885d8c99432e1c32887707655221 (patch)
treef1d259d8b75d40797d79366b9389a5e31d4a3f69 /ctr-std
parentFilter out glibc symbols (diff)
downloadctru-rs-48ee173596fe885d8c99432e1c32887707655221.tar.xz
ctru-rs-48ee173596fe885d8c99432e1c32887707655221.zip
Stub out set_cloexec
Diffstat (limited to 'ctr-std')
-rw-r--r--ctr-std/src/sys/unix/fd.rs28
1 files changed, 2 insertions, 26 deletions
diff --git a/ctr-std/src/sys/unix/fd.rs b/ctr-std/src/sys/unix/fd.rs
index e19cbb0..d7913e5 100644
--- a/ctr-std/src/sys/unix/fd.rs
+++ b/ctr-std/src/sys/unix/fd.rs
@@ -110,33 +110,9 @@ impl FileDesc {
}
}
- #[cfg(not(any(target_env = "newlib",
- target_os = "solaris",
- target_os = "emscripten",
- target_os = "fuchsia",
- target_os = "l4re",
- target_os = "haiku")))]
+ // We don't have fork/exec on the 3DS, so this shouldn't need to do anything
pub fn set_cloexec(&self) -> io::Result<()> {
- unsafe {
- cvt(libc::ioctl(self.fd, libc::FIOCLEX))?;
- Ok(())
- }
- }
- #[cfg(any(target_env = "newlib",
- target_os = "solaris",
- target_os = "emscripten",
- target_os = "fuchsia",
- target_os = "l4re",
- target_os = "haiku"))]
- pub fn set_cloexec(&self) -> io::Result<()> {
- unsafe {
- let previous = cvt(libc::fcntl(self.fd, libc::F_GETFD))?;
- let new = previous | libc::FD_CLOEXEC;
- if new != previous {
- cvt(libc::fcntl(self.fd, libc::F_SETFD, new))?;
- }
- Ok(())
- }
+ Ok(())
}
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> {