summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--lib/spawni.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b0554ff5da..08efc65917 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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