posix_spawn: Expose file_actions_add[f]chdir.

The non-"_np" versions were exported, but not declared in the header.
Do that, and also make the "_np" versions the alias, as these are
specified in POSIX-2024.
This commit is contained in:
Augustin Cavalier
2026-01-29 15:00:12 -05:00
parent afbcaac486
commit 4310e8e1c8
2 changed files with 8 additions and 4 deletions
+4 -4
View File
@@ -195,7 +195,7 @@ posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *_actions,
extern "C" int
posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *_actions,
posix_spawn_file_actions_addchdir(posix_spawn_file_actions_t *_actions,
const char *path)
{
struct _posix_spawn_file_actions* actions = _actions != NULL ? *_actions : NULL;
@@ -222,7 +222,7 @@ posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *_actions,
extern "C" int
posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *_actions,
posix_spawn_file_actions_addfchdir(posix_spawn_file_actions_t *_actions,
int fildes)
{
struct _posix_spawn_file_actions* actions = _actions != NULL ? *_actions : NULL;
@@ -623,5 +623,5 @@ posix_spawnp(pid_t *pid, const char *file,
}
B_DEFINE_WEAK_ALIAS(posix_spawn_file_actions_addchdir_np, posix_spawn_file_actions_addchdir);
B_DEFINE_WEAK_ALIAS(posix_spawn_file_actions_addfchdir_np, posix_spawn_file_actions_addfchdir);
B_DEFINE_WEAK_ALIAS(posix_spawn_file_actions_addchdir, posix_spawn_file_actions_addchdir_np);
B_DEFINE_WEAK_ALIAS(posix_spawn_file_actions_addfchdir, posix_spawn_file_actions_addfchdir_np);