From e46d0c7e74701ea90fd1a8f562620aa5b26c97ad Mon Sep 17 00:00:00 2001 From: Berrysoft Date: Thu, 10 Apr 2025 14:43:28 +0800 Subject: [PATCH] cygwin: posix_spawn_file_actions_add[f]chdir[_np] --- libc-test/semver/cygwin.txt | 4 ++++ src/unix/cygwin/mod.rs | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/libc-test/semver/cygwin.txt b/libc-test/semver/cygwin.txt index 2b0b827674fdf..99e822ca62d18 100644 --- a/libc-test/semver/cygwin.txt +++ b/libc-test/semver/cygwin.txt @@ -734,8 +734,12 @@ posix_fadvise posix_fallocate posix_madvise posix_spawn +posix_spawn_file_actions_addchdir +posix_spawn_file_actions_addchdir_np posix_spawn_file_actions_addclose posix_spawn_file_actions_adddup2 +posix_spawn_file_actions_addfchdir +posix_spawn_file_actions_addfchdir_np posix_spawn_file_actions_addopen posix_spawn_file_actions_destroy posix_spawn_file_actions_init diff --git a/src/unix/cygwin/mod.rs b/src/unix/cygwin/mod.rs index 9fe63985f1180..c2fda6768b2b0 100644 --- a/src/unix/cygwin/mod.rs +++ b/src/unix/cygwin/mod.rs @@ -2479,6 +2479,22 @@ extern "C" { fd: c_int, newfd: c_int, ) -> c_int; + pub fn posix_spawn_file_actions_addchdir( + actions: *mut crate::posix_spawn_file_actions_t, + path: *const c_char, + ) -> c_int; + pub fn posix_spawn_file_actions_addfchdir( + actions: *mut crate::posix_spawn_file_actions_t, + fd: c_int, + ) -> c_int; + pub fn posix_spawn_file_actions_addchdir_np( + actions: *mut crate::posix_spawn_file_actions_t, + path: *const c_char, + ) -> c_int; + pub fn posix_spawn_file_actions_addfchdir_np( + actions: *mut crate::posix_spawn_file_actions_t, + fd: c_int, + ) -> c_int; pub fn forkpty( amaster: *mut c_int,