about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBenjamin Lamowski <benjamin.lamowski@kernkonzept.com>2022-01-14 17:42:40 +0100
committerBenjamin Lamowski <benjamin.lamowski@kernkonzept.com>2022-03-09 11:53:27 +0100
commitbc199b57784ec60bc9492c1a046c585af7ee8ea4 (patch)
tree5442470eb8068a2bc99bb8b512e76a597caea0ec
parentcb013d480252a77233781f45273f190759471e3d (diff)
downloadrust-bc199b57784ec60bc9492c1a046c585af7ee8ea4.tar.gz
rust-bc199b57784ec60bc9492c1a046c585af7ee8ea4.zip
add as_raw() method to L4Re's Socket mock
Minimally comply with with #87329 to avoid breaking tests on L4Re.
-rw-r--r--library/std/src/sys/unix/l4re.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/l4re.rs b/library/std/src/sys/unix/l4re.rs
index d45c51030f6..f052d8f7f05 100644
--- a/library/std/src/sys/unix/l4re.rs
+++ b/library/std/src/sys/unix/l4re.rs
@@ -122,6 +122,11 @@ pub mod net {
         pub fn take_error(&self) -> io::Result<Option<io::Error>> {
             unimpl!();
         }
+
+        // This is used by sys_common code to abstract over Windows and Unix.
+        pub fn as_raw(&self) -> RawFd {
+            self.as_raw_fd()
+        }
     }
 
     impl AsInner<FileDesc> for Socket {