diff options
| author | bors <bors@rust-lang.org> | 2022-01-29 16:08:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-01-29 16:08:35 +0000 |
| commit | a00e130dae74a213338e2b095ec855156d8f3d8a (patch) | |
| tree | d8afd415e451e7e736cf2ca49902c67d75207744 /library/std/src/sys | |
| parent | d08e816333281b0c0fb5a99c2c15d8084312e41a (diff) | |
| parent | d62b414b808be3d75204d6b15cf8547643703109 (diff) | |
| download | rust-a00e130dae74a213338e2b095ec855156d8f3d8a.tar.gz rust-a00e130dae74a213338e2b095ec855156d8f3d8a.zip | |
Auto merge of #93457 - matthiaskrgr:rollup-e43ry1l, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #88205 (Add Explanation For Error E0772) - #92274 (Add `intrinsics::const_deallocate`) - #93236 (Make `NonNull::new` `const`) - #93299 (Fix dot separator when there is no source link) - #93410 (kmc-solid: Implement `net::FileDesc::duplicate`) - #93424 (fix nit) - #93431 (remove unused `jemallocator` crate) - #93453 (Add GUI theme change test) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/solid/abi/sockets.rs | 3 | ||||
| -rw-r--r-- | library/std/src/sys/solid/net.rs | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/library/std/src/sys/solid/abi/sockets.rs b/library/std/src/sys/solid/abi/sockets.rs index 7c21d0dd25e..eb06a6dd927 100644 --- a/library/std/src/sys/solid/abi/sockets.rs +++ b/library/std/src/sys/solid/abi/sockets.rs @@ -175,6 +175,9 @@ extern "C" { #[link_name = "SOLID_NET_Close"] pub fn close(s: c_int) -> c_int; + #[link_name = "SOLID_NET_Dup"] + pub fn dup(s: c_int) -> c_int; + #[link_name = "SOLID_NET_GetPeerName"] pub fn getpeername(s: c_int, name: *mut sockaddr, namelen: *mut socklen_t) -> c_int; diff --git a/library/std/src/sys/solid/net.rs b/library/std/src/sys/solid/net.rs index 63ba6341c79..c91ecce4d72 100644 --- a/library/std/src/sys/solid/net.rs +++ b/library/std/src/sys/solid/net.rs @@ -107,7 +107,7 @@ impl FileDesc { } fn duplicate(&self) -> io::Result<FileDesc> { - super::unsupported() + cvt(unsafe { netc::dup(self.fd) }).map(Self::new) } } |
