diff options
author | Bruno Haible <bruno@clisp.org> | 2022-11-20 12:47:20 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2022-11-20 12:47:20 +0100 |
commit | 6ec9bc73686fd42d0a1a82c914d89176745cddbd (patch) | |
tree | 4ce8d7700be7a195bc36a61c558e33083beeca82 | |
parent | f95881059ba63660646b819d0c02a07c2972c233 (diff) | |
download | gnulib-6ec9bc73686fd42d0a1a82c914d89176745cddbd.tar.gz |
posix_spawn-internal: Avoid warning on macOS.
Suggested by Minsoo Choo in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00114.html>.
* lib/spawni.c: Ignore -Wdeprecated-declarations warnings.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/spawni.c | 7 |
2 files changed, 14 insertions, 0 deletions
@@ -1,5 +1,12 @@ 2022-11-20 Bruno Haible <bruno@clisp.org> + posix_spawn-internal: Avoid warning on macOS. + Suggested by Minsoo Choo in + <https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00114.html>. + * lib/spawni.c: Ignore -Wdeprecated-declarations warnings. + +2022-11-20 Bruno Haible <bruno@clisp.org> + posix_spawn tests: Fix compilation error (regression 2022-09-14). * modules/posix_spawn-tests (Makefile.am): Augment DEFS, to define EXEEXT. diff --git a/lib/spawni.c b/lib/spawni.c index b3b3b56f31..a5081fd45b 100644 --- a/lib/spawni.c +++ b/lib/spawni.c @@ -854,6 +854,13 @@ __spawni (pid_t *pid, const char *prog_filename, #else +/* The warning "warning: 'vfork' is deprecated: Use posix_spawn or fork" seen + on macOS 12 is pointless, as we use vfork only when it is safe or when the + user has explicitly requested it. Silence this warning. */ +#if __GNUC__ >= 3 +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + /* Spawn a new process executing PATH with the attributes describes in *ATTRP. Before running the process perform the actions described in FILE-ACTIONS. */ int |