about summary refs log tree commit diff
path: root/library/std/src/sys/net/connection/socket/unix.rs
diff options
context:
space:
mode:
author王宇逸 <Strawberry_Str@hotmail.com>2024-12-26 16:52:54 +0900
committer王宇逸 <Strawberry_Str@hotmail.com>2025-03-10 21:23:31 +0800
commitc9ccec93fa5e87f1363f0ce6edc897340e8c3884 (patch)
treea1ffb9dc01993eeeb09e71a164288b2e5b2c04ea /library/std/src/sys/net/connection/socket/unix.rs
parent2b285cd5f0877e30ad1d83e04f8cc46254e43391 (diff)
downloadrust-c9ccec93fa5e87f1363f0ce6edc897340e8c3884.tar.gz
rust-c9ccec93fa5e87f1363f0ce6edc897340e8c3884.zip
Initial STD support for Cygwin
Signed-off-by: Ookiineko <chiisaineko@protonmail.com>
Diffstat (limited to 'library/std/src/sys/net/connection/socket/unix.rs')
-rw-r--r--library/std/src/sys/net/connection/socket/unix.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/sys/net/connection/socket/unix.rs b/library/std/src/sys/net/connection/socket/unix.rs
index e633cf772c5..647058385a2 100644
--- a/library/std/src/sys/net/connection/socket/unix.rs
+++ b/library/std/src/sys/net/connection/socket/unix.rs
@@ -81,6 +81,7 @@ impl Socket {
                     target_os = "linux",
                     target_os = "netbsd",
                     target_os = "openbsd",
+                    target_os = "cygwin",
                     target_os = "nto",
                     target_os = "solaris",
                 ))] {
@@ -128,6 +129,7 @@ impl Socket {
                     target_os = "hurd",
                     target_os = "netbsd",
                     target_os = "openbsd",
+                    target_os = "cygwin",
                     target_os = "nto",
                 ))] {
                     // Like above, set cloexec atomically
@@ -257,6 +259,7 @@ impl Socket {
                 target_os = "hurd",
                 target_os = "netbsd",
                 target_os = "openbsd",
+                target_os = "cygwin",
             ))] {
                 unsafe {
                     let fd = cvt_r(|| libc::accept4(self.as_raw_fd(), storage, len, libc::SOCK_CLOEXEC))?;