]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
posix: Make posix_spawn extensions available by default
authorFlorian Weimer <fweimer@redhat.com>
Fri, 4 Nov 2022 06:43:59 +0000 (07:43 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 4 Nov 2022 12:29:52 +0000 (13:29 +0100)
Some sources merely include <spawn.h> without -D_GNU_SOURCE and expect
declarations for posix_spawn_file_actions_addchdir_np to be available.
For consistency, declare posix_spawn_file_actions_addfchdir_np,
posix_spawn_file_actions_addclosefrom_np,
posix_spawn_file_actions_addtcsetpgrp_np as well.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
posix/spawn.h

index c4a81227b04490b817ed4a5784f2e5a47c4ccbf7..f3bcbc56be142369a8e3c67fa253b5f21d0cb520 100644 (file)
@@ -198,7 +198,7 @@ extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *
                                             int __fd, int __newfd)
      __THROW __nonnull ((1));
 
-#ifdef __USE_GNU
+#ifdef __USE_MISC
 /* Add an action changing the directory to PATH during spawn.  This
    affects the subsequent file actions.  */
 extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *
@@ -227,7 +227,7 @@ posix_spawn_file_actions_addtcsetpgrp_np (posix_spawn_file_actions_t *,
                                          int __tcfd)
      __THROW __nonnull ((1));
 
-#endif
+#endif /* __USE_MISC */
 
 __END_DECLS